Class: LanguageOperator::Dsl::ExecutionContext
- Inherits:
-
Object
- Object
- LanguageOperator::Dsl::ExecutionContext
- Includes:
- Helpers
- Defined in:
- lib/language_operator/dsl/execution_context.rb
Overview
Execution context that includes helpers for tool execution
Provides helper methods during tool execution, allowing tools to access HTTP, Shell, Config and other utilities directly.
Constant Summary collapse
- HTTP =
Provide access to HTTP and Shell helper classes as constants
LanguageOperator::Dsl::HTTP
- Shell =
LanguageOperator::Dsl::Shell
Instance Method Summary collapse
-
#initialize(params) ⇒ ExecutionContext
constructor
Initialize execution context with parameters.
-
#method_missing(method, *args) ⇒ Object
Forward missing methods to helpers.
-
#respond_to_missing?(method, include_private = false) ⇒ Boolean
Check if method is available.
Methods included from Helpers
#env_get, #env_required, #error, #parse_csv, #run_command, #shell_escape, #success, #truncate, #validate_email, #validate_phone, #validate_url
Constructor Details
#initialize(params) ⇒ ExecutionContext
Initialize execution context with parameters
24 25 26 |
# File 'lib/language_operator/dsl/execution_context.rb', line 24 def initialize(params) @params = params end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
Forward missing methods to helpers
32 33 34 35 |
# File 'lib/language_operator/dsl/execution_context.rb', line 32 def method_missing(method, *args) # Allow helper methods to be called directly super end |
Instance Method Details
#respond_to_missing?(method, include_private = false) ⇒ Boolean
Check if method is available
42 43 44 |
# File 'lib/language_operator/dsl/execution_context.rb', line 42 def respond_to_missing?(method, include_private = false) LanguageOperator::Dsl::Helpers.instance_methods.include?(method) || super end |