Class: Rafflesia::FoundryModelListData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoundryModelListData
- Defined in:
- lib/rafflesia/foundry/foundry_model_list_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ data: :data, has_more: :has_more, object: :object }.freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#has_more ⇒ Object
Returns the value of attribute has_more.
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoundryModelListData
constructor
A new instance of FoundryModelListData.
Constructor Details
#initialize(json) ⇒ FoundryModelListData
Returns a new instance of FoundryModelListData.
19 20 21 22 23 24 25 |
# File 'lib/rafflesia/foundry/foundry_model_list_data.rb', line 19 def initialize(json) super() hash = self.class.normalize(json) @data = (hash[:data] || []).map { |item| item ? Rafflesia::FoundryModelDescriptor.new(item) : nil } @has_more = hash[:has_more] @object = hash[:object] end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
14 15 16 |
# File 'lib/rafflesia/foundry/foundry_model_list_data.rb', line 14 def data @data end |
#has_more ⇒ Object
Returns the value of attribute has_more.
14 15 16 |
# File 'lib/rafflesia/foundry/foundry_model_list_data.rb', line 14 def has_more @has_more end |
#object ⇒ Object
Returns the value of attribute object.
14 15 16 |
# File 'lib/rafflesia/foundry/foundry_model_list_data.rb', line 14 def object @object end |