Class: RubyLLM::MCP::Configuration::ConfigFile
- Inherits:
-
Object
- Object
- RubyLLM::MCP::Configuration::ConfigFile
- Defined in:
- lib/ruby_llm/mcp/configuration.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
Instance Method Summary collapse
-
#initialize(file_path) ⇒ ConfigFile
constructor
A new instance of ConfigFile.
- #parse ⇒ Object
Constructor Details
#initialize(file_path) ⇒ ConfigFile
Returns a new instance of ConfigFile.
161 162 163 |
# File 'lib/ruby_llm/mcp/configuration.rb', line 161 def initialize(file_path) @file_path = file_path end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
159 160 161 |
# File 'lib/ruby_llm/mcp/configuration.rb', line 159 def file_path @file_path end |
Instance Method Details
#parse ⇒ Object
165 166 167 168 169 170 171 172 |
# File 'lib/ruby_llm/mcp/configuration.rb', line 165 def parse @parse ||= if @file_path && File.exist?(@file_path) config = parse_config_file load_mcps_config(config) else [] end end |