Class: Retab::Subdocument
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::Subdocument
- Defined in:
- lib/retab/splits/subdocument.rb
Constant Summary collapse
- HASH_ATTRS =
{ name: :name, description: :description, allow_multiple_instances: :allow_multiple_instances }.freeze
Instance Attribute Summary collapse
-
#allow_multiple_instances ⇒ Object
Returns the value of attribute allow_multiple_instances.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ Subdocument
constructor
A new instance of Subdocument.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ Subdocument
Returns a new instance of Subdocument.
19 20 21 22 23 24 |
# File 'lib/retab/splits/subdocument.rb', line 19 def initialize(json) hash = self.class.normalize(json) @name = hash[:name] @description = hash[:description] @allow_multiple_instances = hash[:allow_multiple_instances] end |
Instance Attribute Details
#allow_multiple_instances ⇒ Object
Returns the value of attribute allow_multiple_instances.
14 15 16 |
# File 'lib/retab/splits/subdocument.rb', line 14 def allow_multiple_instances @allow_multiple_instances end |
#description ⇒ Object
Returns the value of attribute description.
14 15 16 |
# File 'lib/retab/splits/subdocument.rb', line 14 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/retab/splits/subdocument.rb', line 14 def name @name end |