Any idea why certain documentation does not work when using show-doc in pry? E.g. see show-doc with String and Array compared to Set here:
show-doc Set
From: /Users/snowcrash/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/set.rb @ line 3:
Class name: Set
Number of lines: 57
--
set.rb - defines the Set class
++
Copyright (c) 2002-2008 Akinori MUSHA <[email protected]>
Documentation by Akinori MUSHA and Gavin Sinclair.
All rights reserved. You can redistribute and/or modify it under the same
terms as Ruby.
$Id: set.rb 37839 2012-11-24 18:51:45Z knu $
== Overview
This library provides the Set class, which deals with a collection
show-doc String
Error: Cannot locate this method: String.
[7] pry(main)> show-doc Array
Error: Cannot locate this method: Array.
try installing pry-doc gem:
gem install pry-doc
OR
as per @JayKilleen
if you are using pry in your rails environment you can also try installing jazz_hands instead github.com/nixme/jazz_hands which brings pry and other gem functionality into rails console.
String and Array aren't methods, they're classes. That's probably why it's giving you that error there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With