Sha256: 29806f15768fe4ebf7b571174d81f219e948908a4ad2664cd9adc999c186f809
Contents?: true
Size: 558 Bytes
Versions: 6
Compression:
Stored size: 558 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
6 entries across 6 versions & 1 rubygems