mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Corrected parameter name in Pry.view_clip doc.
This commit is contained in:
parent
2e6833e0b2
commit
85123ab81c
1 changed files with 4 additions and 3 deletions
|
@ -95,11 +95,12 @@ class Pry
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue