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

renamed OptionParser#new to #define.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2002-12-02 09:40:44 +00:00
parent 90c4dae08f
commit b480079083

View file

@ -1022,35 +1022,35 @@ Default options, which never appear in option summary.
cf. ((<OptionParser#switch>)).
=end #'#"#`#
def new(*opts, &block)
def define(*opts, &block)
top.append(*(sw = make_switch(*opts, &block)))
sw[0]
end
def on(*opts, &block)
new(*opts, &block)
define(*opts, &block)
self
end
alias def_option new
alias def_option define
def new_head(*opts, &block)
def define_head(*opts, &block)
top.prepend(*(sw = make_switch(*opts, &block)))
sw[0]
end
def on_head(*opts, &block)
new_head(*opts, &block)
define_head(*opts, &block)
self
end
alias def_head_option new_head
alias def_head_option define_head
def new_tail(*opts, &block)
def define_tail(*opts, &block)
base.append(*(sw = make_switch(*opts, &block)))
sw[0]
end
def on_tail(*opts, &block)
new_tail(*opts, &block)
define_tail(*opts, &block)
self
end
alias def_tail_option new_tail
alias def_tail_option define_tail
def separator(string)
top.append(string, nil, nil)