diff options
Diffstat (limited to 'doc/ruby/method.rb')
-rw-r--r-- | doc/ruby/method.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/doc/ruby/method.rb b/doc/ruby/method.rb deleted file mode 100644 index 3f02ff5798..0000000000 --- a/doc/ruby/method.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'optparse' -parser = OptionParser.new -def xxx_handler(value) - p ['Handler method for -xxx called with value:', value] -end -parser.on('--xxx', 'Option with no argument', method(:xxx_handler)) -def yyy_handler(value) - p ['Handler method for -yyy called with value:', value] -end -parser.on('--yyy YYY', 'Option with required argument', method(:yyy_handler)) -parser.parse! |