Class: TTY::Option::Parameter::Environment

Inherits:
TTY::Option::Parameter show all
Defined in:
lib/tty/option/parameter/environment.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, #desc, #desc?, #display?, #dup, #eql?, #hidden, #hidden?, #initialize, #min_arity, #multi_argument?, #multiple?, #name, #optional, #optional?, #permit, #permit?, #required, #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

#<=>(other) ⇒ Object

Compare this env var to another



14
15
16
# File 'lib/tty/option/parameter/environment.rb', line 14

def <=>(other)
  name <=> other.name
end

#default_nameObject



7
8
9
# File 'lib/tty/option/parameter/environment.rb', line 7

def default_name
  key.to_s.tr("-", "_").upcase
end