diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-02 09:40:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-02 09:40:44 +0000 |
commit | b480079083ea29466bae5a06811c2abcc7b127af (patch) | |
tree | 432d6f7a7b12d8d875f710478d40e25af0e43227 /lib/optparse.rb | |
parent | 90c4dae08fea47797b3ae574e5dfe35dc66f5631 (diff) |
renamed OptionParser#new to #define.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r-- | lib/optparse.rb | 18 |
1 files 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. ((<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) |