1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

updating docs, and added --private flag to .yardopts to include private methods in documentation

This commit is contained in:
John Mair 2011-01-21 14:15:25 +13:00
parent 548b4f82d8
commit 0f028ff7bc
4 changed files with 5 additions and 11 deletions

View file

@ -1 +1 @@
--markup markdown
--markup markdown --private

View file

@ -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

View file

@ -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

View file

@ -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