Class: TTY::Option::Parameter::Keyword

Inherits:
TTY::Option::Parameter show all
Defined in:
lib/tty/option/parameter/keyword.rb

Constant Summary

Constants inherited from TTY::Option::Parameter

ONE_OR_MORE_ARITY, ZERO_OR_MORE_ARITY

Instance Attribute Summary

Attributes inherited from TTY::Option::Parameter

#key

Instance Method Summary collapse

Methods inherited from TTY::Option::Parameter

#<=>, #==, #arity, #convert, #convert?, create, #default, #default?, #default_arity, #default_name, #desc, #desc?, #display?, #dup, #eql?, #hidden, #hidden?, #initialize, #min_arity, #multi_argument?, #multiple?, #name, #optional, #optional?, #permit, #permit?, #required, #to_h, #to_sym, #validate, #validate?

Methods included from DSL::Conversion

#list_of, #map_of

Methods included from DSL::Arity

#at_least, #one, #one_or_more, #two, #two_or_more, #zero_or_more

Constructor Details

This class inherits a constructor from TTY::Option::Parameter

Instance Method Details

#required?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/tty/option/parameter/keyword.rb', line 9

def required?
  @settings.fetch(:required) { false }
end