Class: Relay::Forms::MCP::Forgejo
- Inherits:
-
Relay::Forms::MCP
- Object
- Relay::Forms::MCP
- Relay::Forms::MCP::Forgejo
- Defined in:
- app/forms/mcp/forgejo.rb
Overview
The Forgejo class represents form state for Relay’s Forgejo MCP preset.
Instance Attribute Summary collapse
-
#token ⇒ String
readonly
Returns the Forgejo access token.
-
#url ⇒ String
readonly
Returns the Forgejo instance URL.
Attributes inherited from Relay::Forms::MCP
Instance Method Summary collapse
-
#data ⇒ Hash
Returns the preset-specific MCP data overrides.
- #initialize(url: "", token: "", **attributes) ⇒ Relay::Forms::MCP::Forgejo constructor
-
#preset ⇒ String
Returns the preset id.
-
#transport ⇒ String
Returns the backing MCP transport.
Methods inherited from Relay::Forms::MCP
build, from_model, from_params, #persisted?
Constructor Details
#initialize(url: "", token: "", **attributes) ⇒ Relay::Forms::MCP::Forgejo
23 24 25 26 27 |
# File 'app/forms/mcp/forgejo.rb', line 23 def initialize(url: "", token: "", **attributes) super(**attributes) @url = url.to_s.strip @token = token.to_s.strip end |
Instance Attribute Details
#token ⇒ String (readonly)
Returns the Forgejo access token
16 17 18 |
# File 'app/forms/mcp/forgejo.rb', line 16 def token @token end |
#url ⇒ String (readonly)
Returns the Forgejo instance URL
11 12 13 |
# File 'app/forms/mcp/forgejo.rb', line 11 def url @url end |
Instance Method Details
#data ⇒ Hash
Returns the preset-specific MCP data overrides
46 47 48 49 50 51 52 53 |
# File 'app/forms/mcp/forgejo.rb', line 46 def data { "env" => { "FORGEJO_URL" => url, "FORGEJO_TOKEN" => token } } end |
#preset ⇒ String
Returns the preset id
32 33 34 |
# File 'app/forms/mcp/forgejo.rb', line 32 def preset "forgejo" end |
#transport ⇒ String
Returns the backing MCP transport
39 40 41 |
# File 'app/forms/mcp/forgejo.rb', line 39 def transport "stdio" end |