module TTY::Option::DSL::Arity

Public Instance Methods

any()
Alias for: zero_or_more
any_args()
Alias for: zero_or_more
at_least(number) click to toggle source

At last number values for arity

@api public

# File lib/tty/option/dsl/arity.rb, line 43
def at_least(number)
  -number.to_i - 1
end
one() click to toggle source

@api public

# File lib/tty/option/dsl/arity.rb, line 8
def one
  1
end
one_or_more() click to toggle source

One or more arity

@api public

# File lib/tty/option/dsl/arity.rb, line 29
def one_or_more
  -2
end
two() click to toggle source

@api public

# File lib/tty/option/dsl/arity.rb, line 13
def two
  2
end
two_or_more() click to toggle source

Two or more arity

@api public

# File lib/tty/option/dsl/arity.rb, line 36
def two_or_more
  -3
end
zero_or_more() click to toggle source

Zero or more arity

@api public

# File lib/tty/option/dsl/arity.rb, line 20
def zero_or_more
  -1
end
Also aliased as: any, any_args