Class: Continuum::Report
- Inherits:
-
Object
- Object
- Continuum::Report
- Defined in:
- src/lib/continuum/report.rb
Overview
This class encapsulates all the metadata relevant to an AMP report.
Instance Attribute Summary collapse
-
#id ⇒ Integer?
Gets the ID of this report.
-
#name ⇒ String
Gets the name of this report.
Instance Method Summary collapse
-
#get_amp_url ⇒ String
Gets the URL to this report in AMP.
-
#initialize(report_id, name) ⇒ Report
constructor
A new instance of Report.
Constructor Details
#initialize(report_id, name) ⇒ Report
Returns a new instance of Report.
20 21 22 23 |
# File 'src/lib/continuum/report.rb', line 20 def initialize(report_id, name) @id = report_id @name = name end |
Instance Attribute Details
#id ⇒ Integer?
Gets the ID of this report.
11 12 13 |
# File 'src/lib/continuum/report.rb', line 11 def id @id end |
#name ⇒ String
Gets the name of this report.
16 17 18 |
# File 'src/lib/continuum/report.rb', line 16 def name @name end |
Instance Method Details
#get_amp_url ⇒ String
Gets the URL to this report in AMP.
28 29 30 31 |
# File 'src/lib/continuum/report.rb', line 28 def get_amp_url return nil unless @id URI.join(Continuum.configuration.amp_instance_url, "/public/reporting/view_report.php?report_id=#{@id}").to_s end |