Class: Rafflesia::ModelCapability
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ModelCapability
- Defined in:
- lib/rafflesia/foundry/model_capability.rb
Constant Summary collapse
- HASH_ATTRS =
{ constraints: :constraints, input_schema_id: :input_schema_id, input_types: :input_types, operation_id: :operation_id, output_schema_id: :output_schema_id, output_types: :output_types, workload: :workload }.freeze
Instance Attribute Summary collapse
-
#constraints ⇒ Object
Returns the value of attribute constraints.
-
#input_schema_id ⇒ Object
Returns the value of attribute input_schema_id.
-
#input_types ⇒ Object
Returns the value of attribute input_types.
-
#operation_id ⇒ Object
Returns the value of attribute operation_id.
-
#output_schema_id ⇒ Object
Returns the value of attribute output_schema_id.
-
#output_types ⇒ Object
Returns the value of attribute output_types.
-
#workload ⇒ Object
Returns the value of attribute workload.
Instance Method Summary collapse
-
#initialize(json) ⇒ ModelCapability
constructor
A new instance of ModelCapability.
Constructor Details
#initialize(json) ⇒ ModelCapability
Returns a new instance of ModelCapability.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/foundry/model_capability.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @constraints = hash[:constraints] || {} @input_schema_id = hash[:input_schema_id] @input_types = (hash[:input_types] || []) @operation_id = hash[:operation_id] @output_schema_id = hash[:output_schema_id] @output_types = (hash[:output_types] || []) @workload = hash[:workload] end |
Instance Attribute Details
#constraints ⇒ Object
Returns the value of attribute constraints.
18 19 20 |
# File 'lib/rafflesia/foundry/model_capability.rb', line 18 def constraints @constraints end |
#input_schema_id ⇒ Object
Returns the value of attribute input_schema_id.
18 19 20 |
# File 'lib/rafflesia/foundry/model_capability.rb', line 18 def input_schema_id @input_schema_id end |
#input_types ⇒ Object
Returns the value of attribute input_types.
18 19 20 |
# File 'lib/rafflesia/foundry/model_capability.rb', line 18 def input_types @input_types end |
#operation_id ⇒ Object
Returns the value of attribute operation_id.
18 19 20 |
# File 'lib/rafflesia/foundry/model_capability.rb', line 18 def operation_id @operation_id end |
#output_schema_id ⇒ Object
Returns the value of attribute output_schema_id.
18 19 20 |
# File 'lib/rafflesia/foundry/model_capability.rb', line 18 def output_schema_id @output_schema_id end |
#output_types ⇒ Object
Returns the value of attribute output_types.
18 19 20 |
# File 'lib/rafflesia/foundry/model_capability.rb', line 18 def output_types @output_types end |
#workload ⇒ Object
Returns the value of attribute workload.
18 19 20 |
# File 'lib/rafflesia/foundry/model_capability.rb', line 18 def workload @workload end |