Class: Lyra::Item

Inherits:
Object show all
Defined in:
lib/lyra/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash: Hash) ⇒ Item

Returns a new instance of Item.



8
9
10
11
12
13
# File 'lib/lyra/item.rb', line 8

def initialize(hash: Hash)
  hash = hash.transform_keys(&:to_sym)
  @key = hash[:key]
  @property_name = hash[:property_name]
  @value = ''
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



4
5
6
# File 'lib/lyra/item.rb', line 4

def key
  @key
end

#property_nameObject (readonly)

Returns the value of attribute property_name.



5
6
7
# File 'lib/lyra/item.rb', line 5

def property_name
  @property_name
end

#valueObject

Returns the value of attribute value.



6
7
8
# File 'lib/lyra/item.rb', line 6

def value
  @value
end