Class: EnhanceSwarm::Configuration
- Inherits:
-
Object
- Object
- EnhanceSwarm::Configuration
- Defined in:
- lib/enhance_swarm/configuration.rb
Instance Attribute Summary collapse
-
#code_standards ⇒ Object
Returns the value of attribute code_standards.
-
#desktop_commander_enabled ⇒ Object
Returns the value of attribute desktop_commander_enabled.
-
#gemini_enabled ⇒ Object
Returns the value of attribute gemini_enabled.
-
#important_notes ⇒ Object
Returns the value of attribute important_notes.
-
#max_concurrent_agents ⇒ Object
Returns the value of attribute max_concurrent_agents.
-
#max_disk_mb ⇒ Object
Returns the value of attribute max_disk_mb.
-
#max_memory_mb ⇒ Object
Returns the value of attribute max_memory_mb.
-
#mcp_tools ⇒ Object
Returns the value of attribute mcp_tools.
-
#monitor_interval ⇒ Object
Returns the value of attribute monitor_interval.
-
#monitor_timeout ⇒ Object
Returns the value of attribute monitor_timeout.
-
#project_description ⇒ Object
Returns the value of attribute project_description.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
-
#task_command ⇒ Object
Returns the value of attribute task_command.
-
#task_move_command ⇒ Object
Returns the value of attribute task_move_command.
-
#technology_stack ⇒ Object
Returns the value of attribute technology_stack.
-
#test_command ⇒ Object
Returns the value of attribute test_command.
-
#worktree_enabled ⇒ Object
Returns the value of attribute worktree_enabled.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #save! ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 22 23 24 |
# File 'lib/enhance_swarm/configuration.rb', line 16 def initialize # Apply smart defaults from project analysis if no config exists if config_file_exists? apply_hardcoded_defaults load_from_file else apply_smart_defaults end end |
Instance Attribute Details
#code_standards ⇒ Object
Returns the value of attribute code_standards.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def code_standards @code_standards end |
#desktop_commander_enabled ⇒ Object
Returns the value of attribute desktop_commander_enabled.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def desktop_commander_enabled @desktop_commander_enabled end |
#gemini_enabled ⇒ Object
Returns the value of attribute gemini_enabled.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def gemini_enabled @gemini_enabled end |
#important_notes ⇒ Object
Returns the value of attribute important_notes.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def important_notes @important_notes end |
#max_concurrent_agents ⇒ Object
Returns the value of attribute max_concurrent_agents.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def max_concurrent_agents @max_concurrent_agents end |
#max_disk_mb ⇒ Object
Returns the value of attribute max_disk_mb.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def max_disk_mb @max_disk_mb end |
#max_memory_mb ⇒ Object
Returns the value of attribute max_memory_mb.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def max_memory_mb @max_memory_mb end |
#mcp_tools ⇒ Object
Returns the value of attribute mcp_tools.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def mcp_tools @mcp_tools end |
#monitor_interval ⇒ Object
Returns the value of attribute monitor_interval.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def monitor_interval @monitor_interval end |
#monitor_timeout ⇒ Object
Returns the value of attribute monitor_timeout.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def monitor_timeout @monitor_timeout end |
#project_description ⇒ Object
Returns the value of attribute project_description.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def project_description @project_description end |
#project_name ⇒ Object
Returns the value of attribute project_name.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def project_name @project_name end |
#task_command ⇒ Object
Returns the value of attribute task_command.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def task_command @task_command end |
#task_move_command ⇒ Object
Returns the value of attribute task_move_command.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def task_move_command @task_move_command end |
#technology_stack ⇒ Object
Returns the value of attribute technology_stack.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def technology_stack @technology_stack end |
#test_command ⇒ Object
Returns the value of attribute test_command.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def test_command @test_command end |
#worktree_enabled ⇒ Object
Returns the value of attribute worktree_enabled.
8 9 10 |
# File 'lib/enhance_swarm/configuration.rb', line 8 def worktree_enabled @worktree_enabled end |
Instance Method Details
#save! ⇒ Object
56 57 58 |
# File 'lib/enhance_swarm/configuration.rb', line 56 def save! File.write(config_file_path, Psych.dump(to_h)) end |
#to_h ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/enhance_swarm/configuration.rb', line 26 def to_h { project: { name: @project_name, description: @project_description, technology_stack: @technology_stack }, commands: { test: @test_command, task: @task_command, task_move: @task_move_command }, orchestration: { max_concurrent_agents: @max_concurrent_agents, monitor_interval: @monitor_interval, monitor_timeout: @monitor_timeout, worktree_enabled: @worktree_enabled }, mcp: { tools: @mcp_tools, gemini_enabled: @gemini_enabled, desktop_commander_enabled: @desktop_commander_enabled }, standards: { code: @code_standards, notes: @important_notes } } end |