Class: Glark::Option
- Inherits:
-
Object
show all
- Defined in:
- lib/glark/util/option.rb
Instance Method Summary
collapse
Constructor Details
#initialize(optee) ⇒ Option
Returns a new instance of Option.
7
8
9
|
# File 'lib/glark/util/option.rb', line 7
def initialize optee
@optee = optee
end
|
Instance Method Details
#add_to_option_data(optdata) ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/glark/util/option.rb', line 24
def add_to_option_data optdata
optdata << {
:tags => tags,
:arg => [ argtype ],
:set => Proc.new { |pat| set pat }
}
end
|
#match_rc(name, values) ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/glark/util/option.rb', line 15
def match_rc name, values
if name == rcfield
values.each do |val|
set val
end
true
end
end
|
11
12
13
|
# File 'lib/glark/util/option.rb', line 11
def tags
[ '--' + rcfield ]
end
|