Module: OpenActive::Concerns::JsonLdSerializable::ClassMethods
- Defined in:
- lib/openactive/concerns/json_ld_serializable.rb
Instance Method Summary collapse
Instance Method Details
#properties ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/openactive/concerns/json_ld_serializable.rb', line 9 def properties @properties ||= begin if superclass.respond_to?(:properties) superclass.properties.clone else {} end end end |
#property(field, as:) ⇒ Object
19 20 21 22 23 |
# File 'lib/openactive/concerns/json_ld_serializable.rb', line 19 def property(field, as:) properties[as] = { field: field, } end |