Class: Sprig::Seed::Attribute
- Inherits:
-
Object
- Object
- Sprig::Seed::Attribute
- Defined in:
- lib/sprig/seed/attribute.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw_value ⇒ Object
readonly
Returns the value of attribute raw_value.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #dependencies ⇒ Object
-
#initialize(name, raw_value) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(name, raw_value) ⇒ Attribute
Returns a new instance of Attribute.
6 7 8 9 |
# File 'lib/sprig/seed/attribute.rb', line 6 def initialize(name, raw_value) @name = name.to_s @raw_value = raw_value end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/sprig/seed/attribute.rb', line 4 def name @name end |
#raw_value ⇒ Object (readonly)
Returns the value of attribute raw_value.
4 5 6 |
# File 'lib/sprig/seed/attribute.rb', line 4 def raw_value @raw_value end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/sprig/seed/attribute.rb', line 4 def value @value end |
Instance Method Details
#dependencies ⇒ Object
11 12 13 |
# File 'lib/sprig/seed/attribute.rb', line 11 def dependencies @dependencies ||= find_dependencies_within(raw_value).uniq end |