Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/musa-dsl/core-ext/arrayfy.rb,
lib/musa-dsl/core-ext/hashify.rb,
lib/musa-dsl/core-ext/deep-copy.rb,
lib/musa-dsl/core-ext/deep-copy.rb
Instance Method Summary collapse
-
#arrayfy(size: nil, default: nil) ⇒ Array
Converts any object into an array, optionally repeated to a target size.
-
#clone(freeze: nil, deep: false) ⇒ Object
Enhanced clone with optional deep copy.
-
#dup(deep: false) ⇒ Object
Enhanced dup with optional deep copy.
-
#hashify(keys: , default: nil) ⇒ Hash
Creates a hash mapping all specified keys to this object's value.
Instance Method Details
#arrayfy(size: nil, default: nil) ⇒ Array
This method is added to Object via refinement. Requires using Musa::Extension::Arrayfy.
Converts any object into an array, optionally repeated to a target size.
83 |
# File 'lib/musa-dsl/core-ext/arrayfy.rb', line 83 class ::Object; end |
#clone(freeze: nil, deep: false) ⇒ Object
This method is added to Object via refinement. Requires using Musa::Extension::DeepCopy.
Enhanced clone with optional deep copy.
297 |
# File 'lib/musa-dsl/core-ext/deep-copy.rb', line 297 class ::Object; end |
#dup(deep: false) ⇒ Object
This method is added to Object via refinement. Requires using Musa::Extension::DeepCopy.
Enhanced dup with optional deep copy.
279 |
# File 'lib/musa-dsl/core-ext/deep-copy.rb', line 279 class ::Object; end |
#hashify(keys: , default: nil) ⇒ Hash
This method is added to Object via refinement. Requires using Musa::Extension::Hashify.
Creates a hash mapping all specified keys to this object's value.
Useful for broadcasting a single value across multiple attributes. Nil objects can be replaced with a default value.
94 |
# File 'lib/musa-dsl/core-ext/hashify.rb', line 94 class ::Object; end |