Class: MagicReport::Report::Process
- Inherits:
-
Object
- Object
- MagicReport::Report::Process
- Defined in:
- lib/magic_report/report/process.rb
Instance Attribute Summary collapse
-
#report ⇒ Object
readonly
Returns the value of attribute report.
Instance Method Summary collapse
- #call(input) ⇒ Object
-
#initialize(report) ⇒ Process
constructor
A new instance of Process.
Constructor Details
#initialize(report) ⇒ Process
Returns a new instance of Process.
8 9 10 |
# File 'lib/magic_report/report/process.rb', line 8 def initialize(report) @report = report end |
Instance Attribute Details
#report ⇒ Object (readonly)
Returns the value of attribute report.
6 7 8 |
# File 'lib/magic_report/report/process.rb', line 6 def report @report end |
Instance Method Details
#call(input) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/magic_report/report/process.rb', line 12 def call(input) if input.is_a? Enumerable input.map do |entity| process_entity(entity) end else process_entity(input) end end |