mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
commit
f698fb6fbb
@ -216,7 +216,9 @@ when 'D'
|
|||||||
puts "Scraping through"
|
puts "Scraping through"
|
||||||
when 'F'
|
when 'F'
|
||||||
puts "You failed!"
|
puts "You failed!"
|
||||||
|
else
|
||||||
|
puts "Alternative grading system, eh?"
|
||||||
|
end
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
@ -283,7 +285,7 @@ class Human
|
|||||||
end
|
end
|
||||||
|
|
||||||
# A class method uses self to distinguish from instance methods.
|
# A class method uses self to distinguish from instance methods.
|
||||||
$ It can only be called on the class, not an instance.
|
# It can only be called on the class, not an instance.
|
||||||
def self.say(msg)
|
def self.say(msg)
|
||||||
puts "#{msg}"
|
puts "#{msg}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user