Class: ROM::Header::Embedded

Inherits:
Attribute show all
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

Attributes inherited from Attribute

#key, #meta, #name, #type

Instance Method Summary collapse

Methods inherited from Attribute

[], #aliased?, coerce, #mapping, #typed?, #union?

Constructor Details

#initializeEmbedded

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.



116
117
118
119
# File 'lib/rom/header/attribute.rb', line 116

def initialize(*)
  super
  @header = meta.fetch(:header)
end

Instance Attribute Details

#headerObject (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



113
114
115
# File 'lib/rom/header/attribute.rb', line 113

def header
  @header
end

Instance Method Details

#pop_keysObject



130
131
132
# File 'lib/rom/header/attribute.rb', line 130

def pop_keys
  header.pop_keys
end

#tuple_keysArray<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

Returns:



126
127
128
# File 'lib/rom/header/attribute.rb', line 126

def tuple_keys
  header.tuple_keys
end