Class: GarbReporter::Report
- Inherits:
-
Object
- Object
- GarbReporter::Report
- Defined in:
- lib/garb-reporter.rb
Instance Method Summary collapse
-
#initialize(profile) ⇒ Report
constructor
A new instance of Report.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(profile) ⇒ Report
Returns a new instance of Report.
8 9 10 |
# File 'lib/garb-reporter.rb', line 8 def initialize(profile) @profile = profile end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/garb-reporter.rb', line 12 def method_missing(method, *args) method_name = method.to_s super unless valid_method_name?(method_name) class_name = build_class_name(method_name) klass = existing_report_class(class_name) || build_new_report_class(method_name, class_name) klass.results(@profile, *args) end |