Class: Object

Inherits:
BasicObject
Defined in:
lib/scruby/core_ext/object.rb

Instance Method Summary collapse

Instance Method Details

#to_arrayObject

Wraps self int an array, #to_a seems to be deprecated



3
4
5
# File 'lib/scruby/core_ext/object.rb', line 3

def to_array
  [*self]
end

#to_procObject



7
8
9
# File 'lib/scruby/core_ext/object.rb', line 7

def to_proc
  Proc.new{ self }
end

#value(*args) ⇒ Object



11
12
13
# File 'lib/scruby/core_ext/object.rb', line 11

def value *args
  self
end