Class: LlmGateway::FluentMapper::MapperDefinition
- Inherits:
-
Object
- Object
- LlmGateway::FluentMapper::MapperDefinition
- Defined in:
- lib/llm_gateway/fluent_mapper.rb
Instance Attribute Summary collapse
-
#mappings ⇒ Object
readonly
Returns the value of attribute mappings.
Instance Method Summary collapse
-
#initialize ⇒ MapperDefinition
constructor
A new instance of MapperDefinition.
- #map(field, options = {}, &block) ⇒ Object
Constructor Details
#initialize ⇒ MapperDefinition
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
#mappings ⇒ Object (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, = {}, &block) @mappings << { field: field, options: , block: block } end |