Class: Dry::Data::Value
Class Method Summary
collapse
Methods inherited from Struct
#[], attribute, #initialize, new, schema, #to_hash
Class Method Details
.attributes(*args) ⇒ Object
12
13
14
15
|
# File 'lib/dry/data/value.rb', line 12
def self.attributes(*args)
super
equalizer.instance_variable_get('@keys').concat(schema.keys).uniq!
end
|
.equalizer ⇒ Object
17
18
19
|
# File 'lib/dry/data/value.rb', line 17
def self.equalizer
@equalizer
end
|
.inherited(klass) ⇒ Object
6
7
8
9
10
|
# File 'lib/dry/data/value.rb', line 6
def self.inherited(klass)
super
klass.instance_variable_set('@equalizer', Equalizer.new)
klass.send(:include, klass.equalizer)
end
|