Class: Rafflesia::FoundryVariantEffectData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoundryVariantEffectData
- Defined in:
- lib/rafflesia/foundry/foundry_variant_effect_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ data: :data, model_id: :model_id, model_release: :model_release, object: :object, provider_request_id: :provider_request_id, scoring_method: :scoring_method, usage: :usage }.freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#model_id ⇒ Object
Returns the value of attribute model_id.
-
#model_release ⇒ Object
Returns the value of attribute model_release.
-
#object ⇒ Object
Returns the value of attribute object.
-
#provider_request_id ⇒ Object
Returns the value of attribute provider_request_id.
-
#scoring_method ⇒ Object
Returns the value of attribute scoring_method.
-
#usage ⇒ Object
Returns the value of attribute usage.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoundryVariantEffectData
constructor
A new instance of FoundryVariantEffectData.
Constructor Details
#initialize(json) ⇒ FoundryVariantEffectData
Returns a new instance of FoundryVariantEffectData.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/foundry/foundry_variant_effect_data.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @data = (hash[:data] || []).map { |item| item ? Rafflesia::FoundryVariantEffect.new(item) : nil } @model_id = hash[:model_id] @model_release = hash[:model_release] @object = hash[:object] @provider_request_id = hash[:provider_request_id] @scoring_method = hash[:scoring_method] @usage = hash[:usage] ? Rafflesia::FoundryVariantEffectUsage.new(hash[:usage]) : nil end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
18 19 20 |
# File 'lib/rafflesia/foundry/foundry_variant_effect_data.rb', line 18 def data @data end |
#model_id ⇒ Object
Returns the value of attribute model_id.
18 19 20 |
# File 'lib/rafflesia/foundry/foundry_variant_effect_data.rb', line 18 def model_id @model_id end |
#model_release ⇒ Object
Returns the value of attribute model_release.
18 19 20 |
# File 'lib/rafflesia/foundry/foundry_variant_effect_data.rb', line 18 def model_release @model_release end |
#object ⇒ Object
Returns the value of attribute object.
18 19 20 |
# File 'lib/rafflesia/foundry/foundry_variant_effect_data.rb', line 18 def object @object end |
#provider_request_id ⇒ Object
Returns the value of attribute provider_request_id.
18 19 20 |
# File 'lib/rafflesia/foundry/foundry_variant_effect_data.rb', line 18 def provider_request_id @provider_request_id end |
#scoring_method ⇒ Object
Returns the value of attribute scoring_method.
18 19 20 |
# File 'lib/rafflesia/foundry/foundry_variant_effect_data.rb', line 18 def scoring_method @scoring_method end |
#usage ⇒ Object
Returns the value of attribute usage.
18 19 20 |
# File 'lib/rafflesia/foundry/foundry_variant_effect_data.rb', line 18 def usage @usage end |