Class: Prevoty::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/prevoty/responses/query_analysis.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#databaseObject (readonly)

Returns the value of attribute database.



118
119
120
# File 'lib/prevoty/responses/query_analysis.rb', line 118

def database
  @database
end

#tableObject (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(options)
  return {
    database: @database, table: @table
  }.to_json
end