Class: McpServer::HistoryFilter
- Inherits:
-
Data
- Object
- Data
- McpServer::HistoryFilter
- Defined in:
- lib/jirametrics/mcp_server.rb
Overview
Bundles the six history + blocked/stalled query parameters that every tool accepts, so they travel as one argument instead of a six-long positional tail through matches_history? and the handlers.
Instance Attribute Summary collapse
-
#currently_blocked ⇒ Object
readonly
Returns the value of attribute currently_blocked.
-
#currently_stalled ⇒ Object
readonly
Returns the value of attribute currently_stalled.
-
#ever_blocked ⇒ Object
readonly
Returns the value of attribute ever_blocked.
-
#ever_stalled ⇒ Object
readonly
Returns the value of attribute ever_stalled.
-
#history_field ⇒ Object
readonly
Returns the value of attribute history_field.
-
#history_value ⇒ Object
readonly
Returns the value of attribute history_value.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#currently_blocked ⇒ Object (readonly)
Returns the value of attribute currently_blocked
70 71 72 |
# File 'lib/jirametrics/mcp_server.rb', line 70 def currently_blocked @currently_blocked end |
#currently_stalled ⇒ Object (readonly)
Returns the value of attribute currently_stalled
70 71 72 |
# File 'lib/jirametrics/mcp_server.rb', line 70 def currently_stalled @currently_stalled end |
#ever_blocked ⇒ Object (readonly)
Returns the value of attribute ever_blocked
70 71 72 |
# File 'lib/jirametrics/mcp_server.rb', line 70 def ever_blocked @ever_blocked end |
#ever_stalled ⇒ Object (readonly)
Returns the value of attribute ever_stalled
70 71 72 |
# File 'lib/jirametrics/mcp_server.rb', line 70 def ever_stalled @ever_stalled end |
#history_field ⇒ Object (readonly)
Returns the value of attribute history_field
70 71 72 |
# File 'lib/jirametrics/mcp_server.rb', line 70 def history_field @history_field end |
#history_value ⇒ Object (readonly)
Returns the value of attribute history_value
70 71 72 |
# File 'lib/jirametrics/mcp_server.rb', line 70 def history_value @history_value end |
Class Method Details
.from(history_field: nil, history_value: nil, ever_blocked: nil, ever_stalled: nil, currently_blocked: nil, currently_stalled: nil) ⇒ Object
73 74 75 76 77 78 79 80 |
# File 'lib/jirametrics/mcp_server.rb', line 73 def self.from(history_field: nil, history_value: nil, ever_blocked: nil, ever_stalled: nil, currently_blocked: nil, currently_stalled: nil, **) new( history_field: history_field, history_value: history_value, ever_blocked: ever_blocked, ever_stalled: ever_stalled, currently_blocked: currently_blocked, currently_stalled: currently_stalled ) end |
Instance Method Details
#blocked_stalled? ⇒ Boolean
84 |
# File 'lib/jirametrics/mcp_server.rb', line 84 def blocked_stalled? = !!(ever_blocked || ever_stalled || currently_blocked || currently_stalled) |
#history? ⇒ Boolean
82 |
# File 'lib/jirametrics/mcp_server.rb', line 82 def history? = !!(history_field && history_value) |
#matches_change?(changes) ⇒ Boolean
86 |
# File 'lib/jirametrics/mcp_server.rb', line 86 def matches_change?(changes) = changes.any? { |c| c.field == history_field && c.value == history_value } |