Class: TableInspector::Indexes
- Inherits:
-
Object
- Object
- TableInspector::Indexes
- Defined in:
- lib/table_inspector/indexes.rb
Instance Attribute Summary collapse
-
#column_name ⇒ Object
readonly
Returns the value of attribute column_name.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
-
#initialize(klass, column_name = nil, colorize: false) ⇒ Indexes
constructor
A new instance of Indexes.
- #render ⇒ Object
Constructor Details
#initialize(klass, column_name = nil, colorize: false) ⇒ Indexes
6 7 8 9 10 |
# File 'lib/table_inspector/indexes.rb', line 6 def initialize(klass, column_name = nil, colorize: false) @klass = klass @column_name = column_name @colorize = colorize end |
Instance Attribute Details
#column_name ⇒ Object (readonly)
Returns the value of attribute column_name.
4 5 6 |
# File 'lib/table_inspector/indexes.rb', line 4 def column_name @column_name end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
4 5 6 |
# File 'lib/table_inspector/indexes.rb', line 4 def klass @klass end |
Instance Method Details
#render ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/table_inspector/indexes.rb', line 12 def render render_title if column_name render_indexes_of_column else render_indexes end end |