Class: CsvHuman::Column
- Inherits:
-
Object
- Object
- CsvHuman::Column
- Defined in:
- lib/csvhuman/column.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
used for record (record key); note: list columns must use the same key.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(key = nil, tag = nil, list: false) ⇒ Column
constructor
A new instance of Column.
- #list? ⇒ Boolean
- #tagged? ⇒ Boolean
Constructor Details
#initialize(key = nil, tag = nil, list: false) ⇒ Column
Returns a new instance of Column.
108 109 110 111 112 |
# File 'lib/csvhuman/column.rb', line 108 def initialize( key=nil, tag=nil, list: false ) @key = key @tag = tag @list = list end |
Instance Attribute Details
#key ⇒ Object (readonly)
used for record (record key); note: list columns must use the same key
104 105 106 |
# File 'lib/csvhuman/column.rb', line 104 def key @key end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
105 106 107 |
# File 'lib/csvhuman/column.rb', line 105 def tag @tag end |
Instance Method Details
#list? ⇒ Boolean
116 |
# File 'lib/csvhuman/column.rb', line 116 def list?() @list; end |
#tagged? ⇒ Boolean
115 |
# File 'lib/csvhuman/column.rb', line 115 def tagged?() @tag.nil? == false; end |