| Class | Capcode::Configuration |
| In: |
lib/capcode/configuration.rb
|
| Parent: | Object |
# File lib/capcode/configuration.rb, line 67
67: def get( key = nil )
68: if key.nil?
69: config
70: else
71: config[key] || nil
72: end
73: end
# File lib/capcode/configuration.rb, line 28
28: def print_debug
29: Capcode::Configuration.config.each do |k, v|
30: puts "** [CONFIG] : #{k} = #{v}"
31: end
32: end
Set global configuration options
Options :
It can exist specifics options depending on a renderer, a helper, …
Example :
module Capcode
set :erb, "/path/to/erb/files"
...
end
# File lib/capcode/configuration.rb, line 58
58: def set( key, value, opts = {} )
59: if Hash === value
60: opts = value
61: value = nil
62: end
63: config[key] = value
64: options[key] = opts
65: end