class Boxxspring::Configuration
Public Class Methods
define_attribute( attribute_name, options = {} )
click to toggle source
# File lib/boxxspring/configuration.rb, line 18 def self.define_attribute( attribute_name, options = {} ) class_eval( "def #{attribute_name}( *arguments ); " + "@#{attribute_name} = arguments.first unless arguments.empty?; " + "@#{attribute_name} || " + ( options[ :default ].nil? ? "nil" : ( options[ :default ].is_a?( String ) ? "'#{options[ :default ]}'" : "#{options[ :default ]}" ) ) + ";" + "end", __FILE__, __LINE__ ) end
reloadable?()
click to toggle source
# File lib/boxxspring/configuration.rb, line 14 def self.reloadable? false end
Public Instance Methods
from_hash( configuration )
click to toggle source
# File lib/boxxspring/configuration.rb, line 39 def from_hash( configuration ) configuration.each_pair do | name, value | self.instance_variable_set( "@#{name}", value ) end end