Class: UserInput::OptionParser::Info

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(short_name, long_name, description, flag, default_value, value, validate) ⇒ Info

Returns a new instance of Info.



11
12
13
14
# File 'lib/user_input/option_parser.rb', line 11

def initialize(short_name, long_name, description, flag, default_value, value, validate)
	@short_name, @long_name, @description, @flag, @default_value, @value, @validate =
	short_name, long_name, description, flag, default_value, value, validate
end

Instance Attribute Details

#default_valueObject

Returns the value of attribute default_value

Returns:

  • (Object)

    the current value of default_value



8
9
10
# File 'lib/user_input/option_parser.rb', line 8

def default_value
  @default_value
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



8
9
10
# File 'lib/user_input/option_parser.rb', line 8

def description
  @description
end

#flagObject

Returns the value of attribute flag

Returns:

  • (Object)

    the current value of flag



8
9
10
# File 'lib/user_input/option_parser.rb', line 8

def flag
  @flag
end

#long_nameObject

Returns the value of attribute long_name

Returns:

  • (Object)

    the current value of long_name



8
9
10
# File 'lib/user_input/option_parser.rb', line 8

def long_name
  @long_name
end

#short_nameObject

Returns the value of attribute short_name

Returns:

  • (Object)

    the current value of short_name



8
9
10
# File 'lib/user_input/option_parser.rb', line 8

def short_name
  @short_name
end

#validateObject

Returns the value of attribute validate

Returns:

  • (Object)

    the current value of validate



8
9
10
# File 'lib/user_input/option_parser.rb', line 8

def validate
  @validate
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



8
9
10
# File 'lib/user_input/option_parser.rb', line 8

def value
  @value
end