Class: FactoryForm::DescriptiveContent
- Inherits:
-
Object
- Object
- FactoryForm::DescriptiveContent
- Defined in:
- lib/factoryform/descriptive_content.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
Returns the value of attribute label.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ DescriptiveContent
constructor
A new instance of DescriptiveContent.
Constructor Details
#initialize(options = {}) ⇒ DescriptiveContent
Returns a new instance of DescriptiveContent.
6 7 8 9 10 11 12 |
# File 'lib/factoryform/descriptive_content.rb', line 6 def initialize( = {}) unless .empty? || [:id].empty? || [:label].empty? @id, @label, @value = [:id], [:label], [:value] || [:label] else raise(ParameterExpectedException, "Missing ID and label") end end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/factoryform/descriptive_content.rb', line 3 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
4 5 6 |
# File 'lib/factoryform/descriptive_content.rb', line 4 def label @label end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/factoryform/descriptive_content.rb', line 4 def value @value end |