Module: DNApi::Component::ClassExt
- Defined in:
- lib/dnapi/component.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#key_id ⇒ Object
Returns the value of attribute key_id.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#stack_versions ⇒ Object
Returns the value of attribute stack_versions.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/dnapi/component.rb', line 6 def description @description end |
#key_id ⇒ Object
Returns the value of attribute key_id.
6 7 8 |
# File 'lib/dnapi/component.rb', line 6 def key_id @key_id end |
#parent ⇒ Object
Returns the value of attribute parent.
6 7 8 |
# File 'lib/dnapi/component.rb', line 6 def parent @parent end |
#stack_versions ⇒ Object
Returns the value of attribute stack_versions.
6 7 8 |
# File 'lib/dnapi/component.rb', line 6 def stack_versions @stack_versions end |
Instance Method Details
#belongs_to(klass) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/dnapi/component.rb', line 11 def belongs_to(klass) name = klass.name.split(/::/).last.downcase self.send :alias_method, name, :parent self.send :alias_method, "#{name}=", :parent= @parent = klass end |