Module: Glitter::Configurable::InstanceMethods

Defined in:
lib/glitter/configurable.rb

Instance Method Summary collapse

Instance Method Details

#configure(path = nil, &block) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/glitter/configurable.rb', line 11

def configure(path=nil,&block)
  if path
    # Read the config file up in thar.
    instance_eval(File.read(path), path)
  else
    # Figure out how we want to call this thing.
    block.arity.zero? ? instance_eval(&block) : block.call(self)
  end
  self
end