Class: Alfred::Handler::Config
- Inherits:
-
Base
- Object
- Base
- Alfred::Handler::Config
show all
- Defined in:
- lib/alfred/handler/cofig.rb
Constant Summary
Constants inherited
from Base
Base::Base_Invoke_Order
Instance Attribute Summary
Attributes inherited from Base
#order, #status
Instance Method Summary
collapse
Methods inherited from Base
#<=>, #action?, #feedback, #feedback?, #on_action, #on_close, #options, #parser, #query, #register, #status_message, #ui, #xml_builder
Constructor Details
#initialize(alfred, opts = {}) ⇒ Config
Returns a new instance of Config.
4
5
6
7
8
9
10
11
12
13
|
# File 'lib/alfred/handler/cofig.rb', line 4
def initialize(alfred, opts = {})
super
@order = 20
@settings = {
:setting => alfred.workflow_setting ,
:break? => true ,
:handler => 'Config'
}.update(opts)
end
|
Instance Method Details
#on_feedback ⇒ Object
29
30
|
# File 'lib/alfred/handler/cofig.rb', line 29
def on_feedback
end
|
#on_help ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/alfred/handler/cofig.rb', line 21
def on_help
{
:kind => 'text' ,
:title => '-c, --config [query]' ,
:subtitle => 'Config Workflow Settings' ,
}
end
|
#on_parser ⇒ Object
15
16
17
18
19
|
# File 'lib/alfred/handler/cofig.rb', line 15
def on_parser
opts.on("-c", "--config CONFIG", "Config Workflow Settings") do |v|
options.config = v
end
end
|