Class: CSVMachine::Field
- Inherits:
-
Object
- Object
- CSVMachine::Field
- Defined in:
- lib/csv-machine/field.rb
Constant Summary collapse
- VALID_OPTIONS =
TODO: :convert
[ :column, :type ]
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #column ⇒ Object
-
#initialize(name, options = {}) ⇒ Field
constructor
A new instance of Field.
Constructor Details
#initialize(name, options = {}) ⇒ Field
Returns a new instance of Field.
10 11 12 |
# File 'lib/csv-machine/field.rb', line 10 def initialize(name, ={}) @name, @options = name.to_sym, end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/csv-machine/field.rb', line 5 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/csv-machine/field.rb', line 6 def @options end |
Instance Method Details
#column ⇒ Object
14 15 16 |
# File 'lib/csv-machine/field.rb', line 14 def column @options[:column] end |