Class: RubyReport::Formatter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- RubyReport::Formatter
- Defined in:
- lib/ruby_report/formatter.rb
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
- #format(value) ⇒ Object
-
#initialize(obj, scope = {}) ⇒ Formatter
constructor
A new instance of Formatter.
- #method_missing(method, *args, &block) ⇒ Object
- #respond_to_missing?(method, include_private) ⇒ Boolean
Constructor Details
#initialize(obj, scope = {}) ⇒ Formatter
Returns a new instance of Formatter.
7 8 9 10 |
# File 'lib/ruby_report/formatter.rb', line 7 def initialize(obj, scope = {}) super(obj) @scope = scope end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
12 13 14 |
# File 'lib/ruby_report/formatter.rb', line 12 def method_missing(method, *args, &block) format(super) end |
Instance Attribute Details
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
5 6 7 |
# File 'lib/ruby_report/formatter.rb', line 5 def scope @scope end |
Instance Method Details
#format(value) ⇒ Object
20 21 22 |
# File 'lib/ruby_report/formatter.rb', line 20 def format(value) value end |
#respond_to_missing?(method, include_private) ⇒ Boolean
16 17 18 |
# File 'lib/ruby_report/formatter.rb', line 16 def respond_to_missing?(method, include_private) super end |