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.



18
19
20
21
# File 'lib/materialist/materializer.rb', line 18

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

Instance Attribute Details

#asObject (readonly)

Returns the value of attribute as.



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

def as
  @as
end

#keyObject (readonly)

Returns the value of attribute key.



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

def key
  @key
end