Class: ROM::Header::Embedded
- Defined in:
- lib/rom/header/attribute.rb
Overview
Embedded attribute is a special attribute type that has a header
This is the base of complex attributes like Hash or Group
Instance Attribute Summary collapse
-
#header ⇒ Object
readonly
private
return [Header] header of an attribute.
Attributes inherited from Attribute
Instance Method Summary collapse
-
#initialize ⇒ Embedded
constructor
private
A new instance of Embedded.
- #pop_keys ⇒ Object
-
#tuple_keys ⇒ Array<Symbol>
private
Return tuple keys from the header.
Methods inherited from Attribute
[], #aliased?, coerce, #mapping, #typed?
Constructor Details
#initialize ⇒ Embedded
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Embedded.
112 113 114 115 |
# File 'lib/rom/header/attribute.rb', line 112 def initialize(*) super @header = .fetch(:header) end |
Instance Attribute Details
#header ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
return [Header] header of an attribute
109 110 111 |
# File 'lib/rom/header/attribute.rb', line 109 def header @header end |
Instance Method Details
#pop_keys ⇒ Object
126 127 128 |
# File 'lib/rom/header/attribute.rb', line 126 def pop_keys header.pop_keys end |
#tuple_keys ⇒ Array<Symbol>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return tuple keys from the header
122 123 124 |
# File 'lib/rom/header/attribute.rb', line 122 def tuple_keys header.tuple_keys end |