Class: RubyLlmAgents::AgentGenerator::ParsedParam
- Inherits:
-
Object
- Object
- RubyLlmAgents::AgentGenerator::ParsedParam
- Defined in:
- lib/generators/ruby_llm_agents/agent_generator.rb
Overview
Helper class for parsing parameter definitions
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, modifier) ⇒ ParsedParam
constructor
A new instance of ParsedParam.
- #required? ⇒ Boolean
Constructor Details
#initialize(name, modifier) ⇒ ParsedParam
Returns a new instance of ParsedParam.
92 93 94 95 96 |
# File 'lib/generators/ruby_llm_agents/agent_generator.rb', line 92 def initialize(name, modifier) @name = name @required = modifier == "required" @default = @required ? nil : modifier end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
90 91 92 |
# File 'lib/generators/ruby_llm_agents/agent_generator.rb', line 90 def default @default end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
90 91 92 |
# File 'lib/generators/ruby_llm_agents/agent_generator.rb', line 90 def name @name end |
Instance Method Details
#required? ⇒ Boolean
98 99 100 |
# File 'lib/generators/ruby_llm_agents/agent_generator.rb', line 98 def required? @required end |