Class: HammerCLI::Output::Adapter::WrapperFormatter
- Inherits:
-
Object
- Object
- HammerCLI::Output::Adapter::WrapperFormatter
- Defined in:
- lib/hammer_cli/output/adapter/wrapper_formatter.rb
Instance Method Summary collapse
- #format(value) ⇒ Object
-
#initialize(formatter, params) ⇒ WrapperFormatter
constructor
A new instance of WrapperFormatter.
Constructor Details
#initialize(formatter, params) ⇒ WrapperFormatter
Returns a new instance of WrapperFormatter.
5 6 7 8 |
# File 'lib/hammer_cli/output/adapter/wrapper_formatter.rb', line 5 def initialize(formatter, params) @formatter = formatter @params = params end |
Instance Method Details
#format(value) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/hammer_cli/output/adapter/wrapper_formatter.rb', line 10 def format(value) if @formatter @formatter.format(value, @params) else value end end |