From b480079083ea29466bae5a06811c2abcc7b127af Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 2 Dec 2002 09:40:44 +0000 Subject: renamed OptionParser#new to #define. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/optparse.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/optparse.rb b/lib/optparse.rb index cbbd572bda..ad47d686e6 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -1022,35 +1022,35 @@ Default options, which never appear in option summary. cf. (()). =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) -- cgit v1.2.3