Class: Prevoty::FunctionCall
- Inherits:
-
Object
- Object
- Prevoty::FunctionCall
- Defined in:
- lib/prevoty/responses/query_analysis.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(data) ⇒ FunctionCall
constructor
A new instance of FunctionCall.
- #to_json(options) ⇒ Object
Constructor Details
#initialize(data) ⇒ FunctionCall
Returns a new instance of FunctionCall.
151 152 153 154 |
# File 'lib/prevoty/responses/query_analysis.rb', line 151 def initialize(data) @name = data["name"] @arguments = data["arguments"] end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
149 150 151 |
# File 'lib/prevoty/responses/query_analysis.rb', line 149 def arguments @arguments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
149 150 151 |
# File 'lib/prevoty/responses/query_analysis.rb', line 149 def name @name end |
Instance Method Details
#to_json(options) ⇒ Object
156 157 158 159 160 |
# File 'lib/prevoty/responses/query_analysis.rb', line 156 def to_json() return { name: @name, arguments: @arguments }.to_json end |