Class: LovelyRufus::Executable
- Inherits:
-
Object
- Object
- LovelyRufus::Executable
- Defined in:
- lib/lovely-rufus/executable.rb
Instance Method Summary collapse
-
#initialize(opts = ARGV) ⇒ Executable
constructor
A new instance of Executable.
- #run(input = $stdin) ⇒ Object
Constructor Details
#initialize(opts = ARGV) ⇒ Executable
Returns a new instance of Executable.
3 4 5 6 7 8 9 10 |
# File 'lib/lovely-rufus/executable.rb', line 3 def initialize opts = ARGV @width = 72 OptionParser.new do |opts| opts.on '-w', '--width WIDTH', Integer, 'Wrapping width' do |width| @width = width end end.parse! opts end |