Class: Tabulard::Adapters::Xlsx::Rows

Inherits:
Object
  • Object
show all
Defined in:
lib/tabulard/adapters/xlsx.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(first_row:, last_row:, include_headers:) ⇒ Rows

Returns a new instance of Rows.



133
134
135
136
137
138
139
140
141
# File 'lib/tabulard/adapters/xlsx.rb', line 133

def initialize(first_row:, last_row:, include_headers:)
  if include_headers
    @headers_coord = first_row
    init(first_row.succ, last_row)
  else
    @headers_coord = nil
    init(first_row, last_row)
  end
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



143
144
145
# File 'lib/tabulard/adapters/xlsx.rb', line 143

def count
  @count
end

#headers_coordObject (readonly)

Returns the value of attribute headers_coord.



143
144
145
# File 'lib/tabulard/adapters/xlsx.rb', line 143

def headers_coord
  @headers_coord
end

Instance Method Details

#coord(row) ⇒ Object



149
150
151
# File 'lib/tabulard/adapters/xlsx.rb', line 149

def coord(row)
  @first_row + row
end

#name(row) ⇒ Object



145
146
147
# File 'lib/tabulard/adapters/xlsx.rb', line 145

def name(row)
  @first_name + row
end