Class: LlmGateway::FluentMapper::MapperDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/llm_gateway/fluent_mapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMapperDefinition

Returns a new instance of MapperDefinition.



135
136
137
# File 'lib/llm_gateway/fluent_mapper.rb', line 135

def initialize
  @mappings = []
end

Instance Attribute Details

#mappingsObject (readonly)

Returns the value of attribute mappings.



133
134
135
# File 'lib/llm_gateway/fluent_mapper.rb', line 133

def mappings
  @mappings
end

Instance Method Details

#map(field, options = {}, &block) ⇒ Object



139
140
141
# File 'lib/llm_gateway/fluent_mapper.rb', line 139

def map(field, options = {}, &block)
  @mappings << { field: field, options: options, block: block }
end