Class: FacebookAds::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/facebook_ads/config.rb

Direct Known Subclasses

Test::Config

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.setting(name, default = nil) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/facebook_ads/config.rb', line 9

def self.setting(name, default = nil)
  attr_writer name

  define_method name do
    unless instance_variable_defined?("@#{name}")
      instance_variable_set("@#{name}", default)
    end
    instance_variable_get("@#{name}")
  end
end

Instance Method Details

#logger=(logger) ⇒ Object



27
28
29
# File 'lib/facebook_ads/config.rb', line 27

def logger=(logger)
  Utils.logger = logger
end