Class: Domainic::Command::Context::InputContext
- Inherits:
-
Object
- Object
- Domainic::Command::Context::InputContext
- Includes:
- Behavior
- Defined in:
- lib/domainic/command/context/input_context.rb
Overview
A context class for managing command input arguments. This class provides a structured way to define, validate, and access input parameters for commands.
Class Method Summary collapse
-
.argument(name, *type_validator_and_description, **options) ⇒ void
Defines an input argument for the command.
Instance Method Summary collapse
-
#initialize(**options) ⇒ Behavior
included
from Behavior
Initializes a new context instance with the given attributes.
-
#to_hash ⇒ Hash{Symbol => Object}
(also: #to_h)
included
from Behavior
Returns a hash of all attribute names and their values.
Class Method Details
.argument(name, *type_validator_and_description, **options) ⇒ void
Defines an input argument for the command
51 |
# File 'lib/domainic/command/context/input_context.rb', line 51 def self.argument(...) = attribute(...) |
Instance Method Details
#initialize(**options) ⇒ Behavior Originally defined in module Behavior
Initializes a new context instance with the given attributes.
#to_hash ⇒ Hash{Symbol => Object} Also known as: to_h Originally defined in module Behavior
Returns a hash of all attribute names and their values.