lib/openactive/concerns/json_ld_serializable.rb in openactive-0.3.0 vs lib/openactive/concerns/json_ld_serializable.rb in openactive-0.4.0
- old
+ new
@@ -23,19 +23,21 @@
end
end
def values
data = {}
- self.class.properties.each do |key, field:|
- data[key] = send(field)
+ self.class.properties.each do |key, field|
+ field_value = field[:field]
+ data[key] = send(field_value)
end
data
end
def to_h
data = {}
- self.class.properties.each do |_key, field:|
- data[field] = send(field)
+ self.class.properties.each do |_key, field|
+ field_value = field[:field]
+ data[field_value] = send(field_value)
end
data
end
end
end