Class: OpConnect::Item::Field
- Inherits:
-
Object
- Object
- OpConnect::Item::Field
- Defined in:
- lib/op_connect/item/field.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#purpose ⇒ Object
readonly
Returns the value of attribute purpose.
-
#recipe ⇒ Object
readonly
Returns the value of attribute recipe.
-
#section ⇒ Object
readonly
Returns the value of attribute section.
-
#should_generate ⇒ Object
(also: #generate?)
readonly
Returns the value of attribute should_generate.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Field
constructor
A new instance of Field.
Constructor Details
#initialize(options = {}) ⇒ Field
Returns a new instance of Field.
8 9 10 11 12 13 14 15 16 |
# File 'lib/op_connect/item/field.rb', line 8 def initialize( = {}) @id = ["id"] @purpose = ["purpose"] if ["purpose"] @type = ["type"] if ["type"] @value = ["value"] @should_generate = ["generate"] || false @recipe = GeneratorRecipe.new(["recipe"]) @section = Object.new(["section"]) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/op_connect/item/field.rb', line 4 def id @id end |
#purpose ⇒ Object (readonly)
Returns the value of attribute purpose.
4 5 6 |
# File 'lib/op_connect/item/field.rb', line 4 def purpose @purpose end |
#recipe ⇒ Object (readonly)
Returns the value of attribute recipe.
4 5 6 |
# File 'lib/op_connect/item/field.rb', line 4 def recipe @recipe end |
#section ⇒ Object (readonly)
Returns the value of attribute section.
4 5 6 |
# File 'lib/op_connect/item/field.rb', line 4 def section @section end |
#should_generate ⇒ Object (readonly) Also known as: generate?
Returns the value of attribute should_generate.
4 5 6 |
# File 'lib/op_connect/item/field.rb', line 4 def should_generate @should_generate end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/op_connect/item/field.rb', line 4 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/op_connect/item/field.rb', line 4 def value @value end |