Class: MistralModels::Model
- Inherits:
-
Object
- Object
- MistralModels::Model
- Defined in:
- lib/mistral_rb/response_models.rb
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#owned_by ⇒ Object
readonly
Returns the value of attribute owned_by.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
Instance Method Summary collapse
-
#initialize(model_hash) ⇒ Model
constructor
A new instance of Model.
Constructor Details
#initialize(model_hash) ⇒ Model
Returns a new instance of Model.
67 68 69 70 71 72 73 |
# File 'lib/mistral_rb/response_models.rb', line 67 def initialize(model_hash) @id = model_hash["id"] @object = model_hash["object"] @created = model_hash["created"] @owned_by = model_hash["owned_by"] @permissions = model_hash["permission"] # This could be further parsed into Permission objects if detailed parsing is required end |
Instance Attribute Details
#created ⇒ Object (readonly)
Returns the value of attribute created.
65 66 67 |
# File 'lib/mistral_rb/response_models.rb', line 65 def created @created end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
65 66 67 |
# File 'lib/mistral_rb/response_models.rb', line 65 def id @id end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
65 66 67 |
# File 'lib/mistral_rb/response_models.rb', line 65 def object @object end |
#owned_by ⇒ Object (readonly)
Returns the value of attribute owned_by.
65 66 67 |
# File 'lib/mistral_rb/response_models.rb', line 65 def owned_by @owned_by end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
65 66 67 |
# File 'lib/mistral_rb/response_models.rb', line 65 def @permissions end |