Class: Merb::AsyncTask

Inherits:
Object
  • Object
show all
Defined in:
lib/merb_gets_ass/async_task.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, timestamp, params) ⇒ AsyncTask

Returns a new instance of AsyncTask.



5
6
7
8
9
# File 'lib/merb_gets_ass/async_task.rb', line 5

def initialize(id, timestamp, params)
  @id         = id
  @timestamp  = timestamp
  @params     = params
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/merb_gets_ass/async_task.rb', line 3

def id
  @id
end

#paramsObject (readonly)

Returns the value of attribute params.



3
4
5
# File 'lib/merb_gets_ass/async_task.rb', line 3

def params
  @params
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



3
4
5
# File 'lib/merb_gets_ass/async_task.rb', line 3

def timestamp
  @timestamp
end

Class Method Details

.description(desc = nil) ⇒ Object



25
26
27
# File 'lib/merb_gets_ass/async_task.rb', line 25

def description(desc=nil)
  @@description ||= desc
end

.exception_handler(&block) ⇒ Object



21
22
23
# File 'lib/merb_gets_ass/async_task.rb', line 21

def exception_handler(&block)
  @@exception ||= block
end

.hostname(hostname) ⇒ Object



13
14
15
# File 'lib/merb_gets_ass/async_task.rb', line 13

def hostname(hostname)
  @@hostname = hostname.collect
end

.inherited(klass) ⇒ Object



33
34
35
36
37
# File 'lib/merb_gets_ass/async_task.rb', line 33

def inherited(klass)
  super
ensure
  AsyncManager.tasks << klass
end

.schedule(sched = nil) ⇒ Object



17
18
19
# File 'lib/merb_gets_ass/async_task.rb', line 17

def schedule(sched=nil)
  @@schedule ||= sched
end

.tags(t = nil) ⇒ Object



29
30
31
# File 'lib/merb_gets_ass/async_task.rb', line 29

def tags(t=nil)
  @@tags ||= t
end