Class: RudeQ::Scope
- Inherits:
-
Object
- Object
- RudeQ::Scope
- Defined in:
- lib/rude_q/scope.rb
Instance Attribute Summary collapse
-
#queue_name ⇒ Object
readonly
Returns the value of attribute queue_name.
Instance Method Summary collapse
- #backlog ⇒ Object
- #get ⇒ Object
-
#initialize(queue_name) ⇒ Scope
constructor
A new instance of Scope.
- #set(data) ⇒ Object
Constructor Details
#initialize(queue_name) ⇒ Scope
Returns a new instance of Scope.
6 7 8 |
# File 'lib/rude_q/scope.rb', line 6 def initialize(queue_name) @queue_name = queue_name end |
Instance Attribute Details
#queue_name ⇒ Object (readonly)
Returns the value of attribute queue_name.
9 10 11 |
# File 'lib/rude_q/scope.rb', line 9 def queue_name @queue_name end |
Instance Method Details
#backlog ⇒ Object
19 20 21 |
# File 'lib/rude_q/scope.rb', line 19 def backlog() RudeQueue.backlog(self.queue_name) end |
#get ⇒ Object
15 16 17 |
# File 'lib/rude_q/scope.rb', line 15 def get() RudeQueue.get(self.queue_name) end |
#set(data) ⇒ Object
11 12 13 |
# File 'lib/rude_q/scope.rb', line 11 def set(data) RudeQueue.set(self.queue_name, data) end |