Class: Prevoty::QueryPayload
- Inherits:
-
Object
- Object
- Prevoty::QueryPayload
- Defined in:
- lib/prevoty/query_payload.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
Returns the value of attribute input.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#processed ⇒ Object
Returns the value of attribute processed.
-
#product ⇒ Object
Returns the value of attribute product.
-
#result ⇒ Object
Returns the value of attribute result.
-
#runtime_version ⇒ Object
Returns the value of attribute runtime_version.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(data) ⇒ QueryPayload
constructor
A new instance of QueryPayload.
- #to_json ⇒ Object
Constructor Details
#initialize(data) ⇒ QueryPayload
Returns a new instance of QueryPayload.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/prevoty/query_payload.rb', line 8 def initialize(data) @product = data[:product] @mode = data[:mode] @version = data[:version] @runtime_version = data[:runtime_version] @processed = data[:processed] @input = data[:input] @result = data[:result] @timestamp = data[:timestamp] end |
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input.
5 6 7 |
# File 'lib/prevoty/query_payload.rb', line 5 def input @input end |
#mode ⇒ Object
Returns the value of attribute mode.
5 6 7 |
# File 'lib/prevoty/query_payload.rb', line 5 def mode @mode end |
#processed ⇒ Object
Returns the value of attribute processed.
5 6 7 |
# File 'lib/prevoty/query_payload.rb', line 5 def processed @processed end |
#product ⇒ Object
Returns the value of attribute product.
5 6 7 |
# File 'lib/prevoty/query_payload.rb', line 5 def product @product end |
#result ⇒ Object
Returns the value of attribute result.
5 6 7 |
# File 'lib/prevoty/query_payload.rb', line 5 def result @result end |
#runtime_version ⇒ Object
Returns the value of attribute runtime_version.
5 6 7 |
# File 'lib/prevoty/query_payload.rb', line 5 def runtime_version @runtime_version end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
5 6 7 |
# File 'lib/prevoty/query_payload.rb', line 5 def @timestamp end |
#version ⇒ Object
Returns the value of attribute version.
5 6 7 |
# File 'lib/prevoty/query_payload.rb', line 5 def version @version end |
Instance Method Details
#to_json ⇒ Object
19 20 21 22 23 24 |
# File 'lib/prevoty/query_payload.rb', line 19 def to_json return { product: @product, mode: @mode, version: @version, input: @input, result: @result, timestamp: @timestamp }.to_json end |