Class: ActiveAdmin::CSVBuilder::Column
- Defined in:
- lib/active_admin/csv_builder.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, block = nil) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(name, block = nil) ⇒ Column
Returns a new instance of Column.
39 40 41 42 |
# File 'lib/active_admin/csv_builder.rb', line 39 def initialize(name, block = nil) @name = name.is_a?(Symbol) ? name.to_s.titleize : name @data = block || name.to_sym end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
37 38 39 |
# File 'lib/active_admin/csv_builder.rb', line 37 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
37 38 39 |
# File 'lib/active_admin/csv_builder.rb', line 37 def name @name end |