Class: Intermix::Table
- Inherits:
-
Object
- Object
- Intermix::Table
- Defined in:
- lib/intermix/table.rb
Constant Summary collapse
- FIELDS =
%w[ db_id db_name schema_id schema_name table_id table_name stats_pct_off size_pct_unsorted row_count sort_key ]
Instance Method Summary collapse
- #full_name ⇒ Object
-
#initialize(data) ⇒ Table
constructor
A new instance of Table.
Constructor Details
#initialize(data) ⇒ Table
Returns a new instance of Table.
18 19 20 21 22 |
# File 'lib/intermix/table.rb', line 18 def initialize(data) raise ArgumentError, 'data cannot be nil.' unless data.present? self.class::FIELDS.each { |field| send("#{field}=", data[field]) } end |
Instance Method Details
#full_name ⇒ Object
24 25 26 |
# File 'lib/intermix/table.rb', line 24 def full_name "\"#{schema_name}\".\"#{table_name}\"" end |