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



21
22
23
24
25
26
27
28
29
30
# File 'lib/facebook_ads/config.rb', line 21

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



39
40
41
# File 'lib/facebook_ads/config.rb', line 39

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