Sha256: fa1ba32bd56112d1bb576a434a35c904e597182668968f88871265c419f6995a

Contents?: true

Size: 666 Bytes

Versions: 6

Compression:

Stored size: 666 Bytes

Contents

module Birst_Command
  module Config
    extend self

    attr_accessor :config_full_path
    @config_full_path = File.join(File.dirname(__FILE__),"../../config.json")

    attr_accessor :options
    @options = {
      :soap_log_level => :error,
      :soap_log => false
    }

    def read_config(config_full_path = @config_full_path)
      @options = @options.merge!(JSON.parse(IO.read(config_full_path), :symbolize_names => true))
    end
    
    def set_debug
      @options = @options.merge!({
                                  :soap_log_level => :debug,
                                  :soap_log => true
                                })
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
Birst_Command-0.3.0 lib/birst_command/config.rb
Birst_Command-0.2.2 lib/birst_command/config.rb
Birst_Command-0.2.1 lib/birst_command/config.rb
Birst_Command-0.2.0 lib/birst_command/config.rb
Birst_Command-0.1.1 lib/birst_command/config.rb
Birst_Command-0.1.0 lib/birst_command/config.rb