Sha256: 7bf9f2089b2a9ed21ab9f67c1aae22ab793bbed12f6b1855a903a9707a3b82df

Contents?: true

Size: 312 Bytes

Versions: 1

Compression:

Stored size: 312 Bytes

Contents

require 'optparse'

module LovelyRufus
  Settings = Struct.new(:width) do
    def initialize(args)
      self.width = 72
      OptionParser.new do |opts|
        opts.on('-w', '--width=WIDTH', Integer, 'Wrapping width') do |width|
          self.width = width
        end
      end.parse! args
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lovely_rufus-0.2.0 lib/lovely_rufus/settings.rb