Class: Retab::Subdocument

Inherits:
Types::BaseModel show all
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

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

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_instancesObject

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

#descriptionObject

Returns the value of attribute description.



14
15
16
# File 'lib/retab/splits/subdocument.rb', line 14

def description
  @description
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/retab/splits/subdocument.rb', line 14

def name
  @name
end