Class: RemoteTable
- Inherits:
-
Object
- Object
- RemoteTable
- Includes:
- Enumerable
- 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/file/html.rb,
lib/remote_table/file/xlsx.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, Html, Ods, RooSpreadsheet, Xls, Xlsx Classes: File, Package, Request, Transform
Constant Summary collapse
- MyCSV =
::FasterCSV
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#package ⇒ Object
Returns the value of attribute package.
-
#request ⇒ Object
Returns the value of attribute request.
-
#table ⇒ Object
Returns the value of attribute table.
-
#transform ⇒ Object
Returns the value of attribute transform.
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #each ⇒ Object (also: #each_row)
-
#initialize(bus) ⇒ RemoteTable
constructor
A new instance of RemoteTable.
- #to_a ⇒ Object (also: #rows)
Constructor Details
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file.
50 51 52 |
# File 'lib/remote_table.rb', line 50 def file @file end |
#package ⇒ Object
Returns the value of attribute package.
50 51 52 |
# File 'lib/remote_table.rb', line 50 def package @package end |
#request ⇒ Object
Returns the value of attribute request.
50 51 52 |
# File 'lib/remote_table.rb', line 50 def request @request end |
#table ⇒ Object
Returns the value of attribute table.
51 52 53 |
# File 'lib/remote_table.rb', line 51 def table @table end |
#transform ⇒ Object
Returns the value of attribute transform.
50 51 52 |
# File 'lib/remote_table.rb', line 50 def transform @transform end |
Class Method Details
.cleanup ⇒ Object
37 38 39 40 41 42 |
# File 'lib/remote_table.rb', line 37 def cleanup paths_for_removal.each do |path| FileUtils.rm_rf path paths_for_removal.delete path end if paths_for_removal.is_a?(Array) end |
.remove_at_exit(path) ⇒ Object
44 45 46 47 |
# File 'lib/remote_table.rb', line 44 def remove_at_exit(path) self.paths_for_removal ||= Array.new paths_for_removal.push path end |
Instance Method Details
#<=>(other) ⇒ Object
75 76 77 |
# File 'lib/remote_table.rb', line 75 def <=>(other) raise "Not implemented" end |
#each ⇒ Object Also known as: each_row
63 64 65 66 |
# File 'lib/remote_table.rb', line 63 def each finish_table! unless table table.each_row { |row| yield row } end |
#to_a ⇒ Object Also known as: rows
69 70 71 72 |
# File 'lib/remote_table.rb', line 69 def to_a cache_rows! if @_row_cache.nil? @_row_cache end |