Class: CsvHuman::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/csvhuman/column.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#keyObject (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

#tagObject (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

Returns:

  • (Boolean)


116
# File 'lib/csvhuman/column.rb', line 116

def list?()    @list; end

#tagged?Boolean

Returns:

  • (Boolean)


115
# File 'lib/csvhuman/column.rb', line 115

def tagged?()  @tag.nil? == false; end