Class: TableInspector::Column
- Inherits:
-
Object
- Object
- TableInspector::Column
- Defined in:
- lib/table_inspector/column.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#presenter ⇒ Object
readonly
Returns the value of attribute presenter.
Instance Method Summary collapse
-
#initialize(klass, column_name, presenter_option) ⇒ Column
constructor
A new instance of Column.
- #render ⇒ Object
Constructor Details
#initialize(klass, column_name, presenter_option) ⇒ Column
Returns a new instance of Column.
7 8 9 10 11 |
# File 'lib/table_inspector/column.rb', line 7 def initialize(klass, column_name, presenter_option) @column = klass.columns.find { |column| column.name == column_name.to_s } @klass = klass @presenter = Presenter.current.new(klass, presenter_option) end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
4 5 6 |
# File 'lib/table_inspector/column.rb', line 4 def column @column end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
4 5 6 |
# File 'lib/table_inspector/column.rb', line 4 def klass @klass end |
#presenter ⇒ Object (readonly)
Returns the value of attribute presenter.
4 5 6 |
# File 'lib/table_inspector/column.rb', line 4 def presenter @presenter end |
Instance Method Details
#render ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/table_inspector/column.rb', line 13 def render break_line # empty line render_title render_body break_line # empty line render_indexes break_line # empty line end |