Class: CLOptions::Flag

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorsObject

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



10
11
12
# File 'lib/cloptions/switch.rb', line 10

def errors
  @errors
end

#parametersObject

Returns the value of attribute parameters

Returns:

  • (Object)

    the current value of parameters



10
11
12
# File 'lib/cloptions/switch.rb', line 10

def parameters
  @parameters
end

#switchObject

Returns the value of attribute switch

Returns:

  • (Object)

    the current value of switch



10
11
12
# File 'lib/cloptions/switch.rb', line 10

def switch
  @switch
end

Instance Method Details

#inspectObject



12
13
14
15
16
17
18
19
20
# File 'lib/cloptions/switch.rb', line 12

def inspect
	"#<%s:0x%x switch=#<CLOptions::Switch %s> parameters=%s errors=%s>" %  [
		self.class,
		object_id << 1,
		switch.to_s,
		parameters.inspect,
		errors.inspect
	]
end