Sha256: a0f9346ae0e1cfd07dac9722193319196d2c72df01d4cb6cf457bf774b41c63a
Contents?: true
Size: 525 Bytes
Versions: 9
Compression:
Stored size: 525 Bytes
Contents
module Spree module Core module EnvironmentExtension extend ActiveSupport::Concern def add_class(name) instance_variable_set "@#{name}", Set.new create_method("#{name}=".to_sym) do |val| instance_variable_set('@' + name, val) end create_method(name.to_sym) do instance_variable_get('@' + name) end end private def create_method(name, &block) self.class.send(:define_method, name, &block) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems