Class: Itrp::Export::Monitor::Exchange
- Inherits:
-
Object
- Object
- Itrp::Export::Monitor::Exchange
- Defined in:
- lib/itrp/export/monitor/exchange.rb
Instance Attribute Summary collapse
-
#basename ⇒ Object
Returns the value of attribute basename.
-
#fullpath ⇒ Object
Returns the value of attribute fullpath.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(export_filename, options) ⇒ Exchange
constructor
A new instance of Exchange.
- #transfer ⇒ Object
Constructor Details
#initialize(export_filename, options) ⇒ Exchange
Returns a new instance of Exchange.
13 14 15 16 17 18 19 |
# File 'lib/itrp/export/monitor/exchange.rb', line 13 def initialize(export_filename, ) @options = @options[:to_ftp_dir].gsub!('\\', '/') @fullpath = export_filename @basename = File.basename(export_filename) @logger = @options[:logger] end |
Instance Attribute Details
#basename ⇒ Object
Returns the value of attribute basename.
11 12 13 |
# File 'lib/itrp/export/monitor/exchange.rb', line 11 def basename @basename end |
#fullpath ⇒ Object
Returns the value of attribute fullpath.
11 12 13 |
# File 'lib/itrp/export/monitor/exchange.rb', line 11 def fullpath @fullpath end |
#options ⇒ Object
Returns the value of attribute options.
11 12 13 |
# File 'lib/itrp/export/monitor/exchange.rb', line 11 def @options end |
Instance Method Details
#transfer ⇒ Object
21 22 23 24 25 |
# File 'lib/itrp/export/monitor/exchange.rb', line 21 def transfer files = transfer_files local_transfer(files) unless option(:to).blank? ftp_transfer(files) unless option(:to_ftp).blank? end |