Sha256: 76a3181bf241fcfe0ddf7ab4f1d017c258c509b8c62d0e8eb16e85cb03c16f4f
Contents?: true
Size: 564 Bytes
Versions: 5
Compression:
Stored size: 564 Bytes
Contents
require 'optparse' module Vedeu class Configuration def self.configure(args = []) new(args).configure end def initialize(args = []) @args = args || [] @options = {} end def configure parser = OptionParser.new do |opts| opts.banner = "Usage: #{$PROGRAM_NAME} [options]" opts.on("-1", "--run-once", "Run application once.") do @options[:interactive] = false end end parser.parse!(args) options end private attr_accessor :args, :options end end
Version data entries
5 entries across 5 versions & 1 rubygems