Class: Materialist::Materializer::Internals::FieldMapping

Inherits:
Object
  • Object
show all
Defined in:
lib/materialist/materializer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, as:) ⇒ FieldMapping

Returns a new instance of FieldMapping.



22
23
24
25
# File 'lib/materialist/materializer.rb', line 22

def initialize(key:, as:)
  @key = key
  @as = as
end

Instance Attribute Details

#asObject (readonly)

Returns the value of attribute as.



27
28
29
# File 'lib/materialist/materializer.rb', line 27

def as
  @as
end

#keyObject (readonly)

Returns the value of attribute key.



27
28
29
# File 'lib/materialist/materializer.rb', line 27

def key
  @key
end