Method: Plock.format_with
- Defined in:
- lib/plock.rb
.format_with(inspect_method, block_source, block_result) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/plock.rb', line 30 def format_with inspect_method, block_source, block_result result = self.output_format.dup result.sub! self::Format::PERCENT_B, block_source result.sub! self::Format::PERCENT_R, block_result.__send__( inspect_method ) return result end |