Class: Klue::Langcraft::DSL::Processors::FullNameProcessor
- Defined in:
- lib/klue/langcraft/dsl/processors/full_name_processor.rb
Overview
FullNameProcessor class for processing full name data
This processor is responsible for handling full name processing operations within the DSL. It inherits from the base Processor class and implements specific logic for full name-related processing.
Instance Attribute Summary
Attributes inherited from Processor
Class Method Summary collapse
Instance Method Summary collapse
-
#build_result_data ⇒ Object
Implementation of logic for building full name data.
Methods inherited from Processor
Constructor Details
This class inherits a constructor from Klue::Langcraft::DSL::Processors::Processor
Class Method Details
.keys ⇒ Object
13 14 15 |
# File 'lib/klue/langcraft/dsl/processors/full_name_processor.rb', line 13 def self.keys [:full_name] # FullNameProcessor's specific key(s) end |
Instance Method Details
#build_result_data ⇒ Object
Implementation of logic for building full name data
18 19 20 21 22 23 24 25 26 |
# File 'lib/klue/langcraft/dsl/processors/full_name_processor.rb', line 18 def build_result_data first_name = data['first_name'] || 'John' last_name = data['last_name'] || 'Doe' full_name = "#{first_name} #{last_name}" { full_name: full_name } end |