Module: Tabulard::Table
Defined Under Namespace
Modules: ClassMethods
Classes: Cell, ClosureError, Error, Header, InputError, Row, TooFewHeaders, TooManyHeaders
Constant Summary
collapse
- Message =
Messaging::MessageVariant
- COL_CONVERTER =
ColConverter.new.freeze
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#messenger ⇒ Object
Returns the value of attribute messenger.
103
104
105
|
# File 'lib/tabulard/table.rb', line 103
def messenger
@messenger
end
|
Class Method Details
.col2int ⇒ Object
14
15
16
|
# File 'lib/tabulard/table.rb', line 14
def self.col2int(...)
COL_CONVERTER.col2int(...)
end
|
.int2col ⇒ Object
18
19
20
|
# File 'lib/tabulard/table.rb', line 18
def self.int2col(...)
COL_CONVERTER.int2col(...)
end
|
Instance Method Details
#close ⇒ Object
113
114
115
116
117
118
119
120
121
122
123
|
# File 'lib/tabulard/table.rb', line 113
def close
return if closed?
yield if block_given?
instance_variables.each { |ivar| remove_instance_variable(ivar) }
@closed = true
nil
end
|
#closed? ⇒ Boolean
125
126
127
|
# File 'lib/tabulard/table.rb', line 125
def closed?
@closed == true
end
|
105
106
107
|
# File 'lib/tabulard/table.rb', line 105
def
raise NoMethodError, "You must implement #{self.class}#each_header => self"
end
|
#each_row ⇒ Object
109
110
111
|
# File 'lib/tabulard/table.rb', line 109
def each_row
raise NoMethodError, "You must implement #{self.class}#each_row => self"
end
|
#initialize(messenger: Messaging::Messenger.new) ⇒ Object
98
99
100
101
|
# File 'lib/tabulard/table.rb', line 98
def initialize(messenger: Messaging::Messenger.new)
@messenger = messenger
@closed = false
end
|