verson 0.4.7. Fixed 'ls' bug in 1.8.7, oops. Updated some docs
This commit is contained in:
parent
971bba3c38
commit
788e5d8ce8
|
@ -57,10 +57,10 @@ class Pry
|
||||||
|
|
||||||
case target_self
|
case target_self
|
||||||
when Module
|
when Module
|
||||||
c = with_constants ? target_self.constants : []
|
c = with_constants ? target_self.constants.inspect : [].inspect
|
||||||
output.puts "#{Pry.view(target.eval("local_variables + instance_variables + #{c}"))}"
|
output.puts "#{Pry.view(target.eval("local_variables + instance_variables + #{c}"))}"
|
||||||
else
|
else
|
||||||
c = with_constants ? target_self.class.constants : []
|
c = with_constants ? target_self.class.constants.inspect : [].inspect
|
||||||
output.puts "#{Pry.view(target.eval("local_variables + instance_variables + #{c}"))}"
|
output.puts "#{Pry.view(target.eval("local_variables + instance_variables + #{c}"))}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
class Pry
|
class Pry
|
||||||
VERSION = "0.4.6"
|
VERSION = "0.4.7"
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,12 +18,12 @@ are:
|
||||||
Local customization (applied to a single Pry session) is done by
|
Local customization (applied to a single Pry session) is done by
|
||||||
passing config hash options to `Pry.start()` or to `Pry.new()`; also the
|
passing config hash options to `Pry.start()` or to `Pry.new()`; also the
|
||||||
same accessors as described above for the `Pry` class exist for a
|
same accessors as described above for the `Pry` class exist for a
|
||||||
Pry instance so that customization can occur during runtime.
|
Pry instance so that customization can occur at runtime.
|
||||||
|
|
||||||
### Input
|
### Input
|
||||||
|
|
||||||
For input Pry accepts any object that implements the `readline` method. This
|
For input Pry accepts any object that implements the `readline` method. This
|
||||||
includes `IO` objects, `StringIO`, `Readline` and custom objects. Pry
|
includes `IO` objects, `StringIO`, `Readline`, `File` and custom objects. Pry
|
||||||
initially defaults to using `Readline` for input.
|
initially defaults to using `Readline` for input.
|
||||||
|
|
||||||
#### Example: Setting global input
|
#### Example: Setting global input
|
||||||
|
@ -69,7 +69,7 @@ the current session is nested) like so:
|
||||||
### Output
|
### Output
|
||||||
|
|
||||||
For output Pry accepts any object that implements the `puts` method. This
|
For output Pry accepts any object that implements the `puts` method. This
|
||||||
includes `IO` objects, `StringIO` and custom objects. Pry initially
|
includes `IO` objects, `StringIO`, `File` and custom objects. Pry initially
|
||||||
defaults to using `$stdout` for output.
|
defaults to using `$stdout` for output.
|
||||||
|
|
||||||
#### Example: Setting global output
|
#### Example: Setting global output
|
||||||
|
@ -109,8 +109,8 @@ A valid Pry command object must inherit from
|
||||||
#### Example: Defining a command object and setting it globally
|
#### Example: Defining a command object and setting it globally
|
||||||
|
|
||||||
class MyCommands < Pry::CommandBase
|
class MyCommands < Pry::CommandBase
|
||||||
command "greet", "Greet the user." do |name|
|
command "greet", "Greet the user." do |name, age|
|
||||||
output.puts "Hello #{name.capitalize}, how are you?"
|
output.puts "Hello #{name.capitalize}, how does it feel being #{age}?"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -118,8 +118,8 @@ A valid Pry command object must inherit from
|
||||||
|
|
||||||
Then inside a pry session:
|
Then inside a pry session:
|
||||||
|
|
||||||
pry(main)> greet john
|
pry(main)> greet john 9
|
||||||
hello John, how are you?
|
Hello John, how does it feel being 9?
|
||||||
=> nil
|
=> nil
|
||||||
|
|
||||||
#### Example: Using a command object in a specific session
|
#### Example: Using a command object in a specific session
|
||||||
|
@ -165,9 +165,9 @@ command.
|
||||||
|
|
||||||
##### `delete` method
|
##### `delete` method
|
||||||
|
|
||||||
The `delete` method deletes a command or a group of a commands; it
|
The `delete` method deletes a command or a group of commands. It
|
||||||
can be useful when inheriting from another command set when you decide
|
can be useful when inheriting from another command set and you wish
|
||||||
to keep only a portion of inherited commands.
|
to keep only a portion of the inherited commands.
|
||||||
|
|
||||||
class MyCommands < Pry::Commands
|
class MyCommands < Pry::Commands
|
||||||
delete "show_method", "show_imethod"
|
delete "show_method", "show_imethod"
|
||||||
|
|
Loading…
Reference in New Issue