Class: Range

Inherits:
Object
  • Object
show all
Defined in:
lib/fix_ranges.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/fix_ranges.rb', line 3

def method_missing(method)
   if to_a.respond_to? method
      return to_a.send(method)
   else
      raise NoMethodError
   end
end