Class: Hanuman::Stage
- Inherits:
-
Object
- Object
- Hanuman::Stage
- Extended by:
- StageClassMethods
- Includes:
- Gorillib::Model, StageInstanceMethods
- Defined in:
- lib/hanuman/stage.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from StageInstanceMethods
Instance Method Summary collapse
Methods included from StageClassMethods
builder, label, register, set_builder
Methods included from StageInstanceMethods
#add_link, #linkable_name, #root
Instance Method Details
#clone ⇒ Object
50 51 52 53 54 |
# File 'lib/hanuman/stage.rb', line 50 def clone cloned_attrs = Hash[ attributes.map{ |key, val| dup_key = key.dup rescue key ; dup_val = val.dup rescue val ; [ dup_key, dup_val ] } ] cloned_links = links.map{ |link| link.dup } self.class.receive(cloned_attrs.merge(links: cloned_links)) end |