Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/lab419/core/object.rb
Instance Method Summary collapse
Instance Method Details
#identity ⇒ Object
2 |
# File 'lib/lab419/core/object.rb', line 2 def identity; self end |
#to_enum_with(mthd = :each, *args, &blk) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/lab419/core/object.rb', line 4 def to_enum_with mthd=:each, *args, &blk return enum_for( mthd, *args ) unless blk Enumerator.new do | yielder | send( mthd, *args ) do | *a, &b | yielder.yield blk.(*a, &b) end end end |