Module: Spree::Core::EnvironmentExtension
- Extended by:
- ActiveSupport::Concern
- Included in:
- Environment, Spree::Core::Environment::Calculators, Promo::Environment
- Defined in:
- lib/spree/core/environment_extension.rb
Instance Method Summary collapse
Instance Method Details
#add_class(name) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/spree/core/environment_extension.rb', line 6 def add_class(name) self.instance_variable_set "@#{name}", Set.new create_method( "#{name}=".to_sym ) { |val| instance_variable_set( "@" + name, val) } create_method(name.to_sym) do instance_variable_get( "@" + name ) end end |