fix Pry.view_clip() docs

This commit is contained in:
Robert Gleeson 2014-03-16 09:49:46 +01:00
parent 7cfae83af8
commit b13029d21d
1 changed files with 11 additions and 8 deletions

View File

@ -161,18 +161,21 @@ class Pry
# #
# An inspector that clips the output to `max_length` chars. # An inspector that clips the output to `max_length` chars.
# In case of > `max_length` chars the `#<Object...> notation is used. # In case of > `max_length` chars the `#<Object...> notation is used.
# @param obj The object to view.
# #
# @param options [Hash] # @param [Object] object
# :max_length The maximum number of chars before clipping occurs. # The object to view.
# default is 60.
# #
# :id boolean to indicate whether or not a hex reprsentation of the object ID # @param [Hash] options
# is attached to the output when the length of inspect is greater than value # @option options [Integer] :max_length (60)
# of `:max_length`. default is false. # The maximum number of chars before clipping occurs.
#
# @option options [Boolean] :id (false)
# Boolean to indicate whether or not a hex reprsentation of the object ID
# is attached to the return value when the length of inspect is greater than
# value of `:max_length`.
# #
# @return [String] # @return [String]
# The string representation of `obj`. # The string representation of `obj`.
# #
def self.view_clip(obj, options = {}) def self.view_clip(obj, options = {})
max = options.fetch :max_length, 60 max = options.fetch :max_length, 60