Skip to content

Commit

Permalink
Corrected parameter name in Pry.view_clip doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
rue committed Sep 8, 2011
1 parent 2e6833e commit 85123ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/pry/pry_class.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ def self.start(target=TOPLEVEL_BINDING, options={})
new(options).repl(target)
end

# A version of `Pry.view` that clips the output to `max_size` chars.
# In case of > `max_size` chars the `#<Object...> notation is used.
# A version of `Pry.view` that clips the output to `max_length` chars.
# In case of > `max_length` chars the `#<Object...> notation is used.
# @param obj The object to view.
# @param max_size The maximum number of chars before clipping occurs.
# @param max_length The maximum number of chars before clipping occurs.
# @return [String] The string representation of `obj`.
#
def self.view_clip(obj, max_length = 60)
if obj.kind_of?(Module) && obj.name.to_s != "" && obj.name.to_s.length <= max_length
obj.name.to_s
Expand Down

0 comments on commit 85123ab

Please sign in to comment.