Module: BlueFactory::Configurable
- Included in:
- BlueFactory
- Defined in:
- lib/blue_factory/modules/configurable.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(target) ⇒ Object
3 4 5 |
# File 'lib/blue_factory/modules/configurable.rb', line 3 def self.extended(target) target.instance_variable_set('@properties', []) end |
Instance Method Details
#set(property, value) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/blue_factory/modules/configurable.rb', line 13 def set(property, value) if @properties.include?(property.to_sym) self.instance_variable_set("@#{property}", value) else raise NoMethodError end end |