Module: Puppet::Util::Assertion::Printer::Styler
- Included in:
- Reporter
- Defined in:
- lib/puppet/util/assertion/printer.rb
Overview
Styler is a mixin that provides a helper method that parses a styled string by evaluating the given proc on an instance of Printer.
Instance Method Summary collapse
Instance Method Details
#style(&proc) ⇒ Object
43 44 45 46 47 |
# File 'lib/puppet/util/assertion/printer.rb', line 43 def style(&proc) printer = Puppet::Util::Assertion::Printer.new printer.instance_eval(&proc) print printer.to_s end |