Class: RemoteTable

Inherits:
Object
  • Object
show all
Defined in:
lib/remote_table.rb,
lib/remote_table/file.rb,
lib/remote_table/package.rb,
lib/remote_table/request.rb,
lib/remote_table/file/csv.rb,
lib/remote_table/file/ods.rb,
lib/remote_table/file/xls.rb,
lib/remote_table/transform.rb,
lib/remote_table/file/fixed_width.rb,
lib/remote_table/file/roo_spreadsheet.rb

Defined Under Namespace

Modules: Csv, FixedWidth, Ods, RooSpreadsheet, Xls Classes: File, Package, Request, Transform

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bus) ⇒ RemoteTable

Returns a new instance of RemoteTable.



21
22
23
24
25
26
# File 'lib/remote_table.rb', line 21

def initialize(bus)
  @transform = Transform.new(bus)
  @package = Package.new(bus)
  @request = Request.new(bus)
  @file = File.new(bus)
end

Instance Attribute Details

#fileObject

Returns the value of attribute file.



18
19
20
# File 'lib/remote_table.rb', line 18

def file
  @file
end

#packageObject

Returns the value of attribute package.



18
19
20
# File 'lib/remote_table.rb', line 18

def package
  @package
end

#requestObject

Returns the value of attribute request.



18
19
20
# File 'lib/remote_table.rb', line 18

def request
  @request
end

#tableObject

Returns the value of attribute table.



19
20
21
# File 'lib/remote_table.rb', line 19

def table
  @table
end

#transformObject

Returns the value of attribute transform.



18
19
20
# File 'lib/remote_table.rb', line 18

def transform
  @transform
end

Instance Method Details

#each_rowObject



28
29
30
31
# File 'lib/remote_table.rb', line 28

def each_row
  finish_table! unless table
  table.each_row { |row| yield row }
end

#rowsObject



33
34
35
36
# File 'lib/remote_table.rb', line 33

def rows
  cache_rows! if @_row_cache.nil?
  @_row_cache
end