Class: Retab::FormField
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::FormField
- Defined in:
- lib/retab/workflow_artifacts/form_field.rb
Constant Summary collapse
- HASH_ATTRS =
{ bbox: :bbox, description: :description, type: :type, key: :key, value: :value }.freeze
Instance Attribute Summary collapse
-
#bbox ⇒ Object
Returns the value of attribute bbox.
-
#description ⇒ Object
Returns the value of attribute description.
-
#key ⇒ Object
Returns the value of attribute key.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ FormField
constructor
A new instance of FormField.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ FormField
Returns a new instance of FormField.
23 24 25 26 27 28 29 30 |
# File 'lib/retab/workflow_artifacts/form_field.rb', line 23 def initialize(json) hash = self.class.normalize(json) @bbox = hash[:bbox] ? Retab::BBox.new(hash[:bbox]) : nil @description = hash[:description] @type = hash[:type] @key = hash[:key] @value = hash[:value] end |
Instance Attribute Details
#bbox ⇒ Object
Returns the value of attribute bbox.
16 17 18 |
# File 'lib/retab/workflow_artifacts/form_field.rb', line 16 def bbox @bbox end |
#description ⇒ Object
Returns the value of attribute description.
16 17 18 |
# File 'lib/retab/workflow_artifacts/form_field.rb', line 16 def description @description end |
#key ⇒ Object
Returns the value of attribute key.
16 17 18 |
# File 'lib/retab/workflow_artifacts/form_field.rb', line 16 def key @key end |
#type ⇒ Object
Returns the value of attribute type.
16 17 18 |
# File 'lib/retab/workflow_artifacts/form_field.rb', line 16 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
16 17 18 |
# File 'lib/retab/workflow_artifacts/form_field.rb', line 16 def value @value end |