Class: ConfSources::CommandLine

Inherits:
Default
  • Object
show all
Defined in:
lib/confsources.rb

Defined Under Namespace

Classes: Wrapper

Instance Attribute Summary

Attributes inherited from Default

#options

Instance Method Summary collapse

Methods inherited from Default

#[], #export_to, #is_defined?, #merge, #merge!, #to_a, #to_pairs, #to_s, #validate!

Constructor Details

#initializeCommandLine


109
110
111
112
113
114
115
116
117
118
119
# File 'lib/confsources.rb', line 109

def initialize
    result = Wrapper.start
    unless result.is_a? Hash
        exit 0
    end
    @options = result.collect { |k,v|
        candidate = ConfMaker::get_options.select{|e|e[:name] == k.to_sym}.first.clone
        candidate[:value] = v
        candidate
    }
end