Class: Ad::AgentArchitecture::Dsl::SettingsDsl

Inherits:
ChildDsl
  • Object
show all
Defined in:
lib/ad/agent_architecture/dsl/settings_dsl.rb

Overview

This class is responsible for defining the settings of a workflow

Instance Attribute Summary

Attributes inherited from ChildDsl

#workflow

Instance Method Summary collapse

Methods inherited from ChildDsl

#data, #initialize

Methods included from DataAccessors

#attributes, #get_attribute, #get_prompt, #get_setting, #prompt_content, #prompts, #sections, #setting_value, #settings

Constructor Details

This class inherits a constructor from Ad::AgentArchitecture::Dsl::ChildDsl

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, **kwargs, &block) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/ad/agent_architecture/dsl/settings_dsl.rb', line 8

def method_missing(name, *args, **kwargs, &block)
  if args.length == 1 && block.nil?
    data[:settings][name] = { value: args.first, description: kwargs[:description] }
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(_name, _include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/ad/agent_architecture/dsl/settings_dsl.rb', line 16

def respond_to_missing?(_name, _include_private = false)
  true
end