diff options
author | John Mair <jrmair@gmail.com> | 2011-01-21 14:15:25 +1300 |
---|---|---|
committer | John Mair <jrmair@gmail.com> | 2011-01-21 14:15:25 +1300 |
commit | 0f028ff7bc05297fb8f8a16eea901a310c1fab12 (patch) | |
tree | ad78d49ce37df20f0ea32949740ce768c0120755 | |
parent | 548b4f82d8bab7d52759d34b1c69350eaac6c4f3 (diff) | |
download | pry-0f028ff7bc05297fb8f8a16eea901a310c1fab12.tar.gz |
updating docs, and added --private flag to .yardopts to include private methods in documentation
-rw-r--r-- | .yardopts | 2 | ||||
-rw-r--r-- | README.markdown | 2 | ||||
-rw-r--r-- | lib/pry/prompts.rb | 2 | ||||
-rw-r--r-- | lib/pry/pry_instance.rb | 10 |
4 files changed, 5 insertions, 11 deletions
@@ -1 +1 @@ ---markup markdown +--markup markdown --private diff --git a/README.markdown b/README.markdown index a92a5a3c..47a31e8e 100644 --- a/README.markdown +++ b/README.markdown @@ -354,7 +354,7 @@ A valid Pry command object must inherit from #### Example: Defining a command object and setting it globally class MyCommands < Pry::CommandBase - command greet", "Greet the user." do |name| + command "greet", "Greet the user." do |name| output.puts "Hello #{name.capitalize}, how are you?" end end diff --git a/lib/pry/prompts.rb b/lib/pry/prompts.rb index 9bcf01c2..fe67c7da 100644 --- a/lib/pry/prompts.rb +++ b/lib/pry/prompts.rb @@ -1,6 +1,6 @@ class Pry - # The default prompt; includes the target + # The default prompt; includes the target and nesting level DEFAULT_PROMPT = [ proc do |target_self, nest_level| if nest_level == 0 diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index 3923aa9f..b49ac096 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -192,10 +192,8 @@ class Pry action = data[:action] options = { - :captures => args_string, - :eval_string => eval_string, - :target => target, :val => val, + :eval_string => eval_string, :nesting => nesting, :output => output, :commands => commands.commands @@ -211,9 +209,6 @@ class Pry case action.arity <=> 0 when -1 - # if arity is negative then we have a *args in 1.8.7. - # In 1.9 we have default values or *args - # Use instance_exec() to make the opts, target, output, etc methods available commands.instance_exec(*args, &action) when 1, 0 @@ -223,8 +218,7 @@ class Pry # doesn't care) args_with_corrected_arity = args.values_at *0..(action.arity - 1) - # Use instance_exec() to make the opts, target, output, etc methods - # available + # Use instance_exec() to make the `opts` method, etc available commands.instance_exec(*args_with_corrected_arity, &action) end |