diff options
Diffstat (limited to 'lib/prettyprint.rb')
| -rw-r--r-- | lib/prettyprint.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/prettyprint.rb b/lib/prettyprint.rb index 6f50192f5d..44ca5e816f 100644 --- a/lib/prettyprint.rb +++ b/lib/prettyprint.rb @@ -33,6 +33,7 @@ # class PrettyPrint + # The version string VERSION = "0.2.0" # This is a convenience method which is same as follows: @@ -486,8 +487,10 @@ class PrettyPrint # It is passed to be similar to a PrettyPrint object itself, by responding to: # * #text # * #breakable + # * #fill_breakable # * #nest # * #group + # * #group_sub # * #flush # * #first? # @@ -521,6 +524,13 @@ class PrettyPrint @output << sep end + # Appends +sep+ to the text to be output. By default +sep+ is ' ' + # + # +width+ argument is here for compatibility. It is a noop argument. + def fill_breakable(sep=' ', width=nil) + @output << sep + end + # Takes +indent+ arg, but does nothing with it. # # Yields to a block. @@ -544,6 +554,15 @@ class PrettyPrint @first.pop end + # Yields to a block for compatibility. + def group_sub # :nodoc: + yield + end + + # Method present for compatibility, but is a noop + def break_outmost_groups # :nodoc: + end + # Method present for compatibility, but is a noop def flush # :nodoc: end |
