Class: RailsMcpServer::Config
- Inherits:
-
Object
- Object
- RailsMcpServer::Config
- Defined in:
- lib/rails-mcp-server/config.rb
Instance Attribute Summary collapse
-
#active_project_path ⇒ Object
Returns the value of attribute active_project_path.
-
#config_dir ⇒ Object
Returns the value of attribute config_dir.
-
#current_project ⇒ Object
Returns the value of attribute current_project.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#projects ⇒ Object
Returns the value of attribute projects.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
14 15 16 17 18 19 20 21 22 |
# File 'lib/rails-mcp-server/config.rb', line 14 def initialize @log_level = Logger::INFO @config_dir = get_config_dir @current_project = nil @active_project_path = nil configure_logger load_projects end |
Instance Attribute Details
#active_project_path ⇒ Object
Returns the value of attribute active_project_path.
5 6 7 |
# File 'lib/rails-mcp-server/config.rb', line 5 def active_project_path @active_project_path end |
#config_dir ⇒ Object
Returns the value of attribute config_dir.
5 6 7 |
# File 'lib/rails-mcp-server/config.rb', line 5 def config_dir @config_dir end |
#current_project ⇒ Object
Returns the value of attribute current_project.
5 6 7 |
# File 'lib/rails-mcp-server/config.rb', line 5 def current_project @current_project end |
#log_level ⇒ Object
Returns the value of attribute log_level.
6 7 8 |
# File 'lib/rails-mcp-server/config.rb', line 6 def log_level @log_level end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/rails-mcp-server/config.rb', line 5 def logger @logger end |
#projects ⇒ Object
Returns the value of attribute projects.
5 6 7 |
# File 'lib/rails-mcp-server/config.rb', line 5 def projects @projects end |
Class Method Details
.setup ⇒ Object
8 9 10 11 12 |
# File 'lib/rails-mcp-server/config.rb', line 8 def self.setup new.tap do |instance| yield(instance) if block_given? end end |