Class: Command::Option

Inherits:
Struct
  • Object
show all
Defined in:
lib/command/option.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#declarationObject

Returns the value of attribute declaration

Returns:

  • (Object)

    the current value of declaration



10
11
12
# File 'lib/command/option.rb', line 10

def declaration
  @declaration
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



10
11
12
# File 'lib/command/option.rb', line 10

def description
  @description
end

#longObject

Returns the value of attribute long

Returns:

  • (Object)

    the current value of long



10
11
12
# File 'lib/command/option.rb', line 10

def long
  @long
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



10
11
12
# File 'lib/command/option.rb', line 10

def name
  @name
end

#necessityObject

Returns the value of attribute necessity

Returns:

  • (Object)

    the current value of necessity



10
11
12
# File 'lib/command/option.rb', line 10

def necessity
  @necessity
end

#negatedObject

Returns the value of attribute negated

Returns:

  • (Object)

    the current value of negated



10
11
12
# File 'lib/command/option.rb', line 10

def negated
  @negated
end

#shortObject

Returns the value of attribute short

Returns:

  • (Object)

    the current value of short



10
11
12
# File 'lib/command/option.rb', line 10

def short
  @short
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



10
11
12
# File 'lib/command/option.rb', line 10

def type
  @type
end

Instance Method Details

#process!(argument) ⇒ Object



11
12
13
14
# File 'lib/command/option.rb', line 11

def process!(argument)
  argument = Command::Types[type][argument] if type
  argument
end