class Git::Commands::Arguments::Bound

Bound arguments object returned by {Arguments#bind}

Provides accessor methods for all defined options and positional arguments, with automatic normalization of aliases to their canonical names.

For every ‘flag_option`, both a plain accessor (e.g. `bound.force`) and a `?`-suffixed predicate alias (e.g. `bound.force?`) are generated, following Ruby convention for boolean predicates. Plain accessors are kept for backward compatibility. `value_option` fields only receive plain accessors.

**Reserved-name exception:** if the ‘?`-suffixed name conflicts with a name in {RESERVED_NAMES} (e.g. `nil?`, `frozen?`), the predicate alias is not generated to avoid overriding built-in `Object` methods. Use hash-style access (`bound`) when the flag name is reserved.

@example Accessing bound arguments

args_def = Arguments.define do
  flag_option :force
  flag_option :remotes, as: ['-r', '--remotes']
  operand :branch_names, repeatable: true
end
bound = args_def.bind('branch1', 'branch2', force: true, remotes: true)
bound.force          # => true
bound.force?         # => true   # ? alias for flag_option
bound.remotes        # => true
bound.remotes?       # => true   # ? alias for flag_option
bound.branch_names   # => ['branch1', 'branch2']

@example Splatting for command execution

args_def = Arguments.define do
  flag_option :force
  operand :file
end
bound = args_def.bind('test.txt', force: true)
bound.to_a  # => ['--force', 'test.txt']

@example Hash-style access for reserved names

args_def = Arguments.define do
  value_option :hash
end
bound = args_def.bind(hash: 'abc123')
bound[:hash]  # => 'abc123'

@api private