Class: PrettyPrint::SingleLine
- Defined in:
- lib/jinx/helpers/pretty_print.rb
Overview
The standard prettyprint
gem SingleLine is adjusted to add an output accessor and an optional output argument to #initialize.
Instance Attribute Summary collapse
-
#output ⇒ String
readonly
The print target.
Instance Method Summary collapse
- #base__initialize ⇒ Object private
-
#initialize(output = '', maxwidth = nil, newline = nil) ⇒ SingleLine
constructor
Overrides the standard SingleLine initializer to supply an output parameter default.
Constructor Details
#initialize(output = '', maxwidth = nil, newline = nil) ⇒ SingleLine
Overrides the standard SingleLine initializer to supply an output parameter default.
19 20 21 |
# File 'lib/jinx/helpers/pretty_print.rb', line 19 def initialize(output='', maxwidth=nil, newline=nil) base__initialize(output, maxwidth, newline) end |
Instance Attribute Details
#output ⇒ String (readonly)
Returns the print target.
13 14 15 |
# File 'lib/jinx/helpers/pretty_print.rb', line 13 def output @output end |
Instance Method Details
#base__initialize ⇒ Object (private)
15 |
# File 'lib/jinx/helpers/pretty_print.rb', line 15 alias :base__initialize :initialize |