Skip to content

Instantly share code, notes, and snippets.

@ikuwow
Created July 8, 2018 07:12
Show Gist options
  • Save ikuwow/c0b71051ead12ae864a9a86281a5188f to your computer and use it in GitHub Desktop.
Save ikuwow/c0b71051ead12ae864a9a86281a5188f to your computer and use it in GitHub Desktop.
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