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