Object
# File lib/mixlib/config/configurable.rb, line 64 def default if @default_block @default_block.call else @default_value end end
# File lib/mixlib/config/configurable.rb, line 32 def defaults_to(default_value = nil, &block) @has_default = true @default_block = block @default_value = default_value self end
# File lib/mixlib/config/configurable.rb, line 44 def get(config) if config.has_key?(@symbol) config[@symbol] elsif @default_block @default_block.call else begin # Some things cannot be dup'd, and you won't know this till after the fact # because all values implement dup config[@symbol] = @default_value.dup rescue TypeError @default_value end end end
Generated with the Darkfish Rdoc Generator 2.