Class: DepsGrapher::Visualizer::CommandOption

Inherits:
Object
  • Object
show all
Defined in:
lib/deps_grapher/visualizer/command_option.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, default) ⇒ CommandOption

Returns a new instance of CommandOption.



8
9
10
11
# File 'lib/deps_grapher/visualizer/command_option.rb', line 8

def initialize(name, default)
  @name = name
  @default = default
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/deps_grapher/visualizer/command_option.rb', line 6

def name
  @name
end

Instance Method Details

#default?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/deps_grapher/visualizer/command_option.rb', line 13

def default?
  @default
end

#to_sObject



17
18
19
# File 'lib/deps_grapher/visualizer/command_option.rb', line 17

def to_s
  name
end