lib/alba/serializer.rb in alba-0.13.0 vs lib/alba/serializer.rb in alba-0.13.1
- old
+ new
@@ -5,13 +5,11 @@
# @!parse extend ClassMethods
# @private
def self.included(base)
super
- base.class_eval do
- @_opts = {} unless instance_variable_defined?('@_opts')
- @_metadata = {} unless instance_variable_defined?('@_metadata')
- end
+ base.instance_variable_set('@_opts', {}) unless base.instance_variable_defined?('@_opts')
+ base.instance_variable_set('@_metadata', {}) unless base.instance_variable_defined?('@_metadata')
base.include InstanceMethods
base.extend ClassMethods
end
# Instance methods