Class: Sprig::Seed::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/sprig/seed/attribute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/sprig/seed/attribute.rb', line 4

def name
  @name
end

#raw_valueObject (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

#valueObject (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

#dependenciesObject



11
12
13
# File 'lib/sprig/seed/attribute.rb', line 11

def dependencies
  @dependencies ||= find_dependencies_within(raw_value).uniq
end