Last active
May 23, 2019 15:50
-
-
Save lsfernandes92/708ff33df2479fcf32dc1de220c6f0cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NullBottle | |
def self.class_method | |
"There is no bottle" | |
end | |
def my_instance_method | |
"There is no bottle" | |
end | |
end | |
irb(main):055:0> NullBottle.class_method | |
=> "There is no bottle" | |
irb(main):056:0> NullBottle.my_instance_method | |
NoMethodError (undefined method `my_instance_method' for NullBottle:Class) | |
irb(main):057:0> NullBottle.new.my_instance_method | |
=> "There is no bottle" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment