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.



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

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.



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

def file
  @file
end

#packageObject

Returns the value of attribute package.



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

def package
  @package
end

#requestObject

Returns the value of attribute request.



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

def request
  @request
end

#tableObject

Returns the value of attribute table.



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

def table
  @table
end

#transformObject

Returns the value of attribute transform.



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

def transform
  @transform
end

Instance Method Details

#each_rowObject



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

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

#rowsObject



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

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