Class: Peddler::LegacyReports::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/peddler/legacy_reports.rb

Overview

A legacy report

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport, name = nil, params = {}) ⇒ Report

Returns a new instance of Report.



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

def initialize(transport, name=nil, params={})
  @transport, @name = transport, name
  params.each_pair{ |key, value| self.send "#{key}=", value }
end

Instance Attribute Details

#frequencyObject

Returns the value of attribute frequency.



33
34
35
# File 'lib/peddler/legacy_reports.rb', line 33

def frequency
  @frequency
end

#idObject

Returns the value of attribute id.



33
34
35
# File 'lib/peddler/legacy_reports.rb', line 33

def id
  @id
end

#nameObject

Returns the value of attribute name.



33
34
35
# File 'lib/peddler/legacy_reports.rb', line 33

def name
  @name
end

#product_lineObject

Returns the value of attribute product_line.



33
34
35
# File 'lib/peddler/legacy_reports.rb', line 33

def product_line
  @product_line
end

Instance Method Details

#bodyObject



40
41
42
43
# File 'lib/peddler/legacy_reports.rb', line 40

def body
  return nil if @name == :upload && @id.nil?
  @body ||= download
end