Class: ExpressAdmin::Components::Presenters::SmartTable::Column
- Inherits:
-
Object
- Object
- ExpressAdmin::Components::Presenters::SmartTable::Column
- Includes:
- Helper
- Defined in:
- app/components/express_admin/smart_table.rb
Constant Summary
Constants included from Helper
Instance Attribute Summary collapse
-
#accessor ⇒ Object
readonly
Returns the value of attribute accessor.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#table_column ⇒ Object
readonly
Returns the value of attribute table_column.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(accessor, title = nil) ⇒ Column
constructor
A new instance of Column.
Methods included from Helper
#accessor_match, #checkmark, #checkmark?, #link, #link?, #make_checkmark, #make_in_words, #make_link, #words, #words?
Constructor Details
#initialize(accessor, title = nil) ⇒ Column
Returns a new instance of Column.
226 227 228 229 230 231 |
# File 'app/components/express_admin/smart_table.rb', line 226 def initialize(accessor, title = nil) @name = accessor.kind_of?(Symbol) ? accessor.to_s.underscore : title.titleize.gsub(/\s+/,'').underscore @accessor = accessor @title = title || @name.titleize @table_column = table_column end |
Instance Attribute Details
#accessor ⇒ Object (readonly)
Returns the value of attribute accessor.
225 226 227 |
# File 'app/components/express_admin/smart_table.rb', line 225 def accessor @accessor end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
225 226 227 |
# File 'app/components/express_admin/smart_table.rb', line 225 def name @name end |
#table_column ⇒ Object (readonly)
Returns the value of attribute table_column.
225 226 227 |
# File 'app/components/express_admin/smart_table.rb', line 225 def table_column @table_column end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
225 226 227 |
# File 'app/components/express_admin/smart_table.rb', line 225 def title @title end |