Class: AbAdmin::Utils::CSVBuilder::Column
- Defined in:
- lib/ab_admin/utils/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.
45 46 47 48 |
# File 'lib/ab_admin/utils/csv_builder.rb', line 45 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.
43 44 45 |
# File 'lib/ab_admin/utils/csv_builder.rb', line 43 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
43 44 45 |
# File 'lib/ab_admin/utils/csv_builder.rb', line 43 def name @name end |