Module: Puffer::Controller::Config::ClassMethods

Defined in:
lib/puffer/controller/config.rb

Instance Method Summary collapse

Instance Method Details

#configurationObject



49
50
51
# File 'lib/puffer/controller/config.rb', line 49

def configuration
  @configuration ||= Config.new(self)
end

#puffer_class_attribute(name, default = nil) ⇒ Object



40
41
42
43
# File 'lib/puffer/controller/config.rb', line 40

def puffer_class_attribute name, default = nil
  class_attribute "_puffer_attribute_#{name}"
  send "_puffer_attribute_#{name}=", default
end

#setup(&block) ⇒ Object



45
46
47
# File 'lib/puffer/controller/config.rb', line 45

def setup &block
  block.bind(Config.new(self)).call
end