Class: StringSet
- Inherits:
-
Object
- Object
- StringSet
- Defined in:
- lib/string_set.rb
Instance Attribute Summary collapse
-
#product_name ⇒ Object
readonly
Returns the value of attribute product_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ StringSet
constructor
A new instance of StringSet.
Constructor Details
#initialize(attributes) ⇒ StringSet
Returns a new instance of StringSet.
3 4 5 |
# File 'lib/string_set.rb', line 3 def initialize(attributes) @product_name = attributes[:product_name] end |
Instance Attribute Details
#product_name ⇒ Object (readonly)
Returns the value of attribute product_name.
2 3 4 |
# File 'lib/string_set.rb', line 2 def product_name @product_name end |
Class Method Details
.from_xml(xml) ⇒ Object
7 8 9 |
# File 'lib/string_set.rb', line 7 def self.from_xml(xml) new(:product_name => xml.text) end |