Exception: Textus::Contract::MissingArgs
- Defined in:
- lib/textus/contract/binder.rb
Overview
Raised when a required arg is absent from the bound input. Surface adapters translate this to their native error (MCP ToolError, CLI UsageError); a direct Ruby call lets it surface as-is.
Instance Attribute Summary collapse
-
#missing ⇒ Object
readonly
Returns the value of attribute missing.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Attributes inherited from Error
#code, #details, #exit_code, #hint
Instance Method Summary collapse
-
#initialize(spec, missing) ⇒ MissingArgs
constructor
A new instance of MissingArgs.
Methods inherited from Error
Constructor Details
#initialize(spec, missing) ⇒ MissingArgs
Returns a new instance of MissingArgs.
9 10 11 12 13 |
# File 'lib/textus/contract/binder.rb', line 9 def initialize(spec, missing) @spec = spec @missing = missing super("missing_args", "#{spec.verb}: missing #{missing.map(&:wire).join(", ")}") end |
Instance Attribute Details
#missing ⇒ Object (readonly)
Returns the value of attribute missing.
7 8 9 |
# File 'lib/textus/contract/binder.rb', line 7 def missing @missing end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
7 8 9 |
# File 'lib/textus/contract/binder.rb', line 7 def spec @spec end |