Class: Generated::Option

Inherits:
Argument show all
Defined in:
lib/generated/option.rb

Constant Summary

Constants inherited from Argument

Argument::SEPARATOR

Instance Attribute Summary collapse

Attributes inherited from Argument

#raw_banner, #raw_default, #raw_desc, #raw_name, #raw_required, #raw_type

Instance Method Summary collapse

Methods inherited from Argument

#argument?, #banner, #banner_content, #default, #desc, #name, #option?, #optional?, #parameter_type, #required, #required?, #type

Constructor Details

#initialize(value) ⇒ Option

Returns a new instance of Option.



9
10
11
12
13
14
15
# File 'lib/generated/option.rb', line 9

def initialize(value)
  super

  @raw_required = false # Options are, well, optional by default
  @raw_hide = false     # Options must be explicitly hidden
  @raw_group = nil      # Leave in the un-labeled group by default
end

Instance Attribute Details

#raw_groupObject

Returns the value of attribute raw_group.



6
7
8
# File 'lib/generated/option.rb', line 6

def raw_group
  @raw_group
end

#raw_hideObject

Returns the value of attribute raw_hide.



6
7
8
# File 'lib/generated/option.rb', line 6

def raw_hide
  @raw_hide
end

Instance Method Details

#groupObject



21
22
23
# File 'lib/generated/option.rb', line 21

def group
  raw_group
end

#hideObject



17
18
19
# File 'lib/generated/option.rb', line 17

def hide
  raw_hide
end