Class: Object
- Defined in:
-
lib/plist4r/mixin/ruby_stdlib.rb,
lib/plist4r/mixin/mixlib_config.rb
Instance Methods
Overview
These methods should all be nemespaced to ::Plist4r we don’t want to upset anyone else’s code
Instance Method Details
- (Object) deep_clone
Make a deep copy of an object. Including a deep copy of all the object’s instance data.
24 |
# File 'lib/plist4r/mixin/ruby_stdlib.rb', line 24 def deep_clone; Marshal::load(Marshal.dump(self)) end |
- (Object) meta_def(name, &blk)
8 9 10 |
# File 'lib/plist4r/mixin/mixlib_config.rb', line 8 def name, &blk (class << self; self; end).instance_eval { define_method name, &blk } end |
- (String) method_name
The method name my_method => “my_method“
13 14 15 16 17 18 |
# File 'lib/plist4r/mixin/ruby_stdlib.rb', line 13 def method_name if /`(.*)'/.match(caller.first) return $1 end nil end |