Class: Merb::AsyncTask
- Inherits:
-
Object
- Object
- Merb::AsyncTask
- Defined in:
- lib/merb_gets_ass/async_task.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Class Method Summary collapse
- .description(desc = nil) ⇒ Object
- .exception_handler(&block) ⇒ Object
- .hostname(hostname) ⇒ Object
- .inherited(klass) ⇒ Object
- .schedule(sched = nil) ⇒ Object
- .tags(t = nil) ⇒ Object
Instance Method Summary collapse
-
#initialize(id, timestamp, params) ⇒ AsyncTask
constructor
A new instance of AsyncTask.
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, , params) @id = id @timestamp = @params = params end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/merb_gets_ass/async_task.rb', line 3 def id @id end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/merb_gets_ass/async_task.rb', line 3 def params @params end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/merb_gets_ass/async_task.rb', line 3 def @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 (t=nil) @@tags ||= t end |