Class: Object

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) to_array

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

- (Object) to_proc



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

def to_proc
  Proc.new{ self }
end

- (Object) value(*args)



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

def value *args
  self
end