Class: OrderReporting::Report
- Inherits:
-
Object
- Object
- OrderReporting::Report
- Defined in:
- lib/order_reporting/report.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Report
constructor
A new instance of Report.
- #send_report ⇒ Object
Constructor Details
#initialize(name) ⇒ Report
Returns a new instance of Report.
5 6 7 |
# File 'lib/order_reporting/report.rb', line 5 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/order_reporting/report.rb', line 3 def name @name end |
Instance Method Details
#send_report ⇒ Object
9 10 11 12 13 |
# File 'lib/order_reporting/report.rb', line 9 def send_report orders.tap do |orders| deliver(mailer.send(@name, orders)) end end |