Class: Eien::Apps::SelectTask

Inherits:
Task
  • Object
show all
Defined in:
lib/eien/apps/select_task.rb

Instance Attribute Summary collapse

Attributes inherited from Task

#context, #namespace, #task_config

Instance Method Summary collapse

Methods included from Helpers::TimeHelpers

#summarize_age

Constructor Details

#initialize(context, app) ⇒ SelectTask

Returns a new instance of SelectTask.



8
9
10
11
12
# File 'lib/eien/apps/select_task.rb', line 8

def initialize(context, app)
  @app = app

  super(context)
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



6
7
8
# File 'lib/eien/apps/select_task.rb', line 6

def app
  @app
end

Instance Method Details

#run!Object



14
15
16
17
18
19
# File 'lib/eien/apps/select_task.rb', line 14

def run!
  the_app = Eien.app_from_name(context, app)

  ::Eien.config.app = the_app..name
  ::Eien.config.save!
end