Class: Prevoty::Table
- Inherits:
-
Object
- Object
- Prevoty::Table
- Defined in:
- lib/prevoty/responses/query_analysis.rb
Instance Attribute Summary collapse
-
#database ⇒ Object
readonly
Returns the value of attribute database.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(data) ⇒ Table
constructor
A new instance of Table.
- #to_json(options) ⇒ Object
Constructor Details
#initialize(data) ⇒ Table
Returns a new instance of Table.
120 121 122 123 |
# File 'lib/prevoty/responses/query_analysis.rb', line 120 def initialize(data) @database = data["database"] @table = data["table"] end |
Instance Attribute Details
#database ⇒ Object (readonly)
Returns the value of attribute database.
118 119 120 |
# File 'lib/prevoty/responses/query_analysis.rb', line 118 def database @database end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
118 119 120 |
# File 'lib/prevoty/responses/query_analysis.rb', line 118 def table @table end |
Instance Method Details
#to_json(options) ⇒ Object
125 126 127 128 129 |
# File 'lib/prevoty/responses/query_analysis.rb', line 125 def to_json() return { database: @database, table: @table }.to_json end |