Created
July 8, 2018 07:12
-
-
Save ikuwow/c0b71051ead12ae864a9a86281a5188f 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
puts 'start' | |
# docs | |
class Hoge | |
# body | |
def mog | |
puts 'this is instance method' | |
end | |
def para | |
puts 'this is instance method 2' | |
end | |
# def self.mog | |
# puts 'this is class method' | |
# end | |
class << self | |
def mog | |
puts 'this is another class method' | |
end | |
def para | |
puts 'this is another instance method 2' | |
end | |
end | |
end | |
Hoge.new.mog | |
Hoge.mog | |
Hoge.new.para | |
Hoge.para |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment