Class: Object

Inherits:
BasicObject
Includes:
CoreEx::EmbeddedTests, CoreEx::Object::InstanceEvalWithArgs, CoreEx::Object::SingletonClass, CoreEx::Object::TheFirstTime
Defined in:
lib/core_ex.rb,
lib/core_ex.rb,
lib/core_ex/try_dup.rb,
lib/core_ex/enumerable.rb

Overview

class Module

Instance Method Summary collapse

Methods included from CoreEx::Object::InstanceEvalWithArgs

#instance_eval_with_args

Methods included from CoreEx::Object::SingletonClass

#singleton_class, #singleton_class_eval

Methods included from CoreEx::Object::TheFirstTime

#the_first_time

Methods included from CoreEx::EmbeddedTests

#embedded_test_mode, #embedded_test_mode?, #run_embedded_test_sections, #test_section

Instance Method Details

#rec_fold(init, &block) ⇒ Object



87
88
89
# File 'lib/core_ex/enumerable.rb', line 87

def rec_fold ( init, &block )
  block[init, self]
end

#try_dupObject

Duplicate an object if it can be duplicated. If it can not be cloned or duplicated, then just return the original object.



29
30
31
# File 'lib/core_ex/try_dup.rb', line 29

def try_dup
  dup
end