Module: Alphonse::Configs::Operation

Included in:
Alphonse::Config
Defined in:
lib/alphonse/configs/operation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



5
6
7
# File 'lib/alphonse/configs/operation.rb', line 5

def command
  @command
end

#descriptionObject (readonly)

Returns the value of attribute description.



5
6
7
# File 'lib/alphonse/configs/operation.rb', line 5

def description
  @description
end

Instance Method Details

#operation(name, description, &block) ⇒ Object



7
8
9
10
11
# File 'lib/alphonse/configs/operation.rb', line 7

def operation(name, description, &block)
  @command = name
  set_attr "#{command}_description".to_sym => description
  block.call if block_given?
end

#tasks(*args) ⇒ Object



13
14
15
# File 'lib/alphonse/configs/operation.rb', line 13

def tasks(*args)
  set_attr command.to_sym => args.flatten
end