Method: Halcyon::Config::Paths#define

Defined in:
lib/halcyon/config/paths.rb

#define(key_or_hash, value = nil) ⇒ Object

Defines a path for the specified entity.

Examples:

Halcyon.paths.define(:tmp, Halcyon.root/'tmp')

OR

Halcyon.paths.define(:tmp => Halcyon.root/'tmp')


38
39
40
41
42
43
44
45
46
# File 'lib/halcyon/config/paths.rb', line 38

def define(key_or_hash, value = nil)
  if key_or_hash.is_a?(Hash) and value.nil?
    key_or_hash.keys.each do |key|
      self.define(key, key_or_hash[key])
    end
  else
    self.paths[key_or_hash] = value
  end
end