Class: Plasma::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/plasma/server.rb

Overview

Handles MCP server operations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Server

Returns a new instance of Server.



10
11
12
# File 'lib/plasma/server.rb', line 10

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/plasma/server.rb', line 8

def options
  @options
end

Instance Method Details

#startObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/plasma/server.rb', line 14

def start
  # Check if we're in a PLASMA project directory
  unless plasma_project?
    puts "Error: Not a PLASMA project directory. Please run this command from the root of a PLASMA project."
    return false
  end

  # Load the application
  app_class = load_application

  # Start the MCP server
  app_class.start_server

  true
rescue Interrupt
  # puts "\nShutting down MCP server..."
end