Sha256: 8f45bab6fc437293d1fd14d99475b55ba56d98a102a9b7bfe61960bdc2b4aa6c
Contents?: true
Size: 345 Bytes
Versions: 5
Compression:
Stored size: 345 Bytes
Contents
require 'optparse' module LovelyRufus Settings = Struct.new(:width) do def initialize(args) self.width = 72 OptionParser.new(&method(:parse)).parse! args end private def parse(opts) opts.on('-w', '--width=WIDTH', Integer, 'Wrapping width') do |width| self.width = width end end end end
Version data entries
5 entries across 5 versions & 1 rubygems