Module: Balloon::Configuration::ClassMethods

Defined in:
lib/balloon/configuration.rb

Instance Method Summary collapse

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



65
# File 'lib/balloon/configuration.rb', line 65

def configure; yield self; end

#setup(configure, env) ⇒ Object



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/balloon/configuration.rb', line 67

def setup(configure, env)
  conf = configure[env]
  conf = configure['defaults'] if conf.nil?
  Balloon.configure do |config|
    conf.each do | n, v |
      if !v.blank? || v ==true || v == false
        if v ==true || v == false
          class_eval "            config.\#{n} = \#{v}\n            RUBY\n        else\n          class_eval <<-RUBY\n            config.\#{n} = '\#{v}'\n          RUBY\n        end\n      end\n    end\n  end\nend\n"