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
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.
72 73 74 |
# File 'lib/remote_table.rb', line 72 def file @file end |
#package ⇒ Object
Returns the value of attribute package.
72 73 74 |
# File 'lib/remote_table.rb', line 72 def package @package end |
#request ⇒ Object
Returns the value of attribute request.
72 73 74 |
# File 'lib/remote_table.rb', line 72 def request @request end |
#table ⇒ Object
Returns the value of attribute table.
73 74 75 |
# File 'lib/remote_table.rb', line 73 def table @table end |
#transform ⇒ Object
Returns the value of attribute transform.
72 73 74 |
# File 'lib/remote_table.rb', line 72 def transform @transform end |
Class Method Details
.cleanup ⇒ Object
59 60 61 62 63 64 |
# File 'lib/remote_table.rb', line 59 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
66 67 68 69 |
# File 'lib/remote_table.rb', line 66 def remove_at_exit(path) self.paths_for_removal ||= Array.new paths_for_removal.push path end |
Instance Method Details
#<=>(other) ⇒ Object
97 98 99 |
# File 'lib/remote_table.rb', line 97 def <=>(other) raise "Not implemented" end |
#each ⇒ Object Also known as: each_row
85 86 87 88 |
# File 'lib/remote_table.rb', line 85 def each finish_table! unless table table.each_row { |row| yield row } end |
#to_a ⇒ Object Also known as: rows
91 92 93 94 |
# File 'lib/remote_table.rb', line 91 def to_a cache_rows! if @_row_cache.nil? @_row_cache end |