Class: Cmdline::Argument

Inherits:
Struct
  • Object
show all
Defined in:
lib/cmdline.rb,
lib/cmdline.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeArgument

Returns a new instance of Argument.



56
57
58
59
60
61
62
63
# File 'lib/cmdline.rb', line 56

def initialize(*)
  super
  self.name ||= ""
  self.description ||= ""
  self.trailing ||= false
  self.value ||= ""
  self.trailing_values ||= []
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



46
47
48
# File 'lib/cmdline.rb', line 46

def description
  @description
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



46
47
48
# File 'lib/cmdline.rb', line 46

def name
  @name
end

#trailingObject

Returns the value of attribute trailing

Returns:

  • (Object)

    the current value of trailing



46
47
48
# File 'lib/cmdline.rb', line 46

def trailing
  @trailing
end

#trailing_valuesObject

Returns the value of attribute trailing_values

Returns:

  • (Object)

    the current value of trailing_values



46
47
48
# File 'lib/cmdline.rb', line 46

def trailing_values
  @trailing_values
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



46
47
48
# File 'lib/cmdline.rb', line 46

def value
  @value
end