Module: Callable

Included in:
Array, BusScheme::Cons, Hash, String
Defined in:
lib/object_extensions.rb

Instance Method Summary collapse

Instance Method Details

#call(*args) ⇒ Object


45
46
47
# File 'lib/object_extensions.rb', line 45

def call(*args)
  self.[](*args)
end

#call_as(sym, *args) ⇒ Object

allows for (mylist 4) => mylist


42
43
44
# File 'lib/object_extensions.rb', line 42

def call_as(sym, *args)
  self.call(*args)
end