Module: Subjoin::Metable
- Included in:
- Document, Identifier, JsonApi, Link, Relationship, Resource
- Defined in:
- lib/subjoin/metable.rb
Overview
Generically handle meta objects
Instance Attribute Summary collapse
-
#meta ⇒ Meta
readonly
The object’s meta attribute.
Instance Method Summary collapse
- #has_meta? ⇒ Boolean
-
#load_meta(data) ⇒ Metable?
Load the object’s attributes.
Instance Attribute Details
#meta ⇒ Meta (readonly)
The object’s meta attribute
7 8 9 |
# File 'lib/subjoin/metable.rb', line 7 def end |
Instance Method Details
#has_meta? ⇒ Boolean
17 18 19 |
# File 'lib/subjoin/metable.rb', line 17 def return ! .nil? end |
#load_meta(data) ⇒ Metable?
Load the object’s attributes
12 13 14 15 |
# File 'lib/subjoin/metable.rb', line 12 def (data) return nil if data.nil? Meta.new(data) end |