Class: Shiba::IndexStats::Index
- Inherits:
-
Struct
- Object
- Struct
- Shiba::IndexStats::Index
- Defined in:
- lib/shiba/index_stats.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#name ⇒ Object
Returns the value of attribute name.
-
#table ⇒ Object
Returns the value of attribute table.
-
#unique ⇒ Object
Returns the value of attribute unique.
Instance Method Summary collapse
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns
58 59 60 |
# File 'lib/shiba/index_stats.rb', line 58 def columns @columns end |
#name ⇒ Object
Returns the value of attribute name
58 59 60 |
# File 'lib/shiba/index_stats.rb', line 58 def name @name end |
#table ⇒ Object
Returns the value of attribute table
58 59 60 |
# File 'lib/shiba/index_stats.rb', line 58 def table @table end |
#unique ⇒ Object
Returns the value of attribute unique
58 59 60 |
# File 'lib/shiba/index_stats.rb', line 58 def unique @unique end |
Instance Method Details
#add_column(column_name, cardinality) ⇒ Object
59 60 61 |
# File 'lib/shiba/index_stats.rb', line 59 def add_column(column_name, cardinality) columns << Column.new(self, column_name, cardinality) end |
#encode_with(coder) ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/shiba/index_stats.rb', line 63 def encode_with(coder) coder.map = self.to_h.stringify_keys coder.map.delete('table') coder.map.delete('unique') unless unique coder.tag = nil end |