Module: BlueFactory::Configurable Private
- Included in:
- BlueFactory
- Defined in:
- lib/blue_factory/modules/configurable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Adds a helper for configuring supported properties to BlueFactory. Use these APIs through the main BlueFactory module, not directly.
Instance Method Summary collapse
-
#set(property, value) ⇒ Object
Sets a configurable property to the given value.
Instance Method Details
#set(property, value) ⇒ Object
Sets a configurable property to the given value.
29 30 31 32 33 34 35 |
# File 'lib/blue_factory/modules/configurable.rb', line 29 def set(property, value) if @properties.include?(property.to_sym) self.instance_variable_set("@#{property}", value) else raise NoMethodError, "No such property: #{property}" end end |