Class: SparkleFormation::Resources::Resource
- Inherits:
-
Struct
- Object
- Struct
- SparkleFormation::Resources::Resource
- Defined in:
- lib/sparkle_formation/resources.rb
Overview
Defines a resource type
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
-
#property(name) ⇒ Property, NilClass
Get property by name.
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
27 28 29 |
# File 'lib/sparkle_formation/resources.rb', line 27 def name @name end |
#properties ⇒ Object
Returns the value of attribute properties
27 28 29 |
# File 'lib/sparkle_formation/resources.rb', line 27 def properties @properties end |
#raw ⇒ Object
Returns the value of attribute raw
27 28 29 |
# File 'lib/sparkle_formation/resources.rb', line 27 def raw @raw end |
Instance Method Details
#property(name) ⇒ Property, NilClass
Get property by name
32 33 34 35 36 |
# File 'lib/sparkle_formation/resources.rb', line 32 def property(name) properties.detect do |prop| prop.name == name end end |