Sha256: de1e0d3f86fd3d16e328183df8487baf7b72d3a065b12e6134bbef3e5fb4089f
Contents?: true
Size: 765 Bytes
Versions: 2
Compression:
Stored size: 765 Bytes
Contents
module Birst_Command require 'erb' 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) parse_erb = ERB.new(IO.read(config_full_path)).result(binding) parse_json = JSON.parse(parse_erb, :symbolize_names => true) @options = @options.merge!(parse_json) end def set_debug @options = @options.merge!({ :soap_log_level => :debug, :soap_log => true }) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
Birst_Command-0.5.0 | lib/birst_command/config.rb |
Birst_Command-0.4.0 | lib/birst_command/config.rb |