Method: SpaceAge#method_missing

Defined in:
lib/hack01/space_age.rb

#method_missing(name, *args, &block) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/hack01/space_age.rb', line 26

def method_missing(name, *args, &block)
  # first time using method_missing
  # super basically checks if the method exists in the class's ancestor
  # (if any)
  super
  raise "'#{name}' is not a method of the class #{self.class}"
end