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.



23
24
25
26
27
28
# File 'lib/remote_table.rb', line 23

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.



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

def file
  @file
end

#packageObject

Returns the value of attribute package.



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

def package
  @package
end

#requestObject

Returns the value of attribute request.



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

def request
  @request
end

#tableObject

Returns the value of attribute table.



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

def table
  @table
end

#transformObject

Returns the value of attribute transform.



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

def transform
  @transform
end

Instance Method Details

#each_rowObject



30
31
32
33
# File 'lib/remote_table.rb', line 30

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

#rowsObject



35
36
37
38
# File 'lib/remote_table.rb', line 35

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