Class: Resque::Queue::Metadata
- Inherits:
-
Object
- Object
- Resque::Queue::Metadata
show all
- Defined in:
- lib/resqueue-metadata/metadata.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(queue_name) ⇒ Metadata
Returns a new instance of Metadata.
10
11
12
|
# File 'lib/resqueue-metadata/metadata.rb', line 10
def initialize queue_name
self.queue_name = queue_name
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meffod, *args) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/resqueue-metadata/metadata.rb', line 18
def method_missing meffod, *args
if hash_key.respond_to? meffod
hash_key.send meffod, *args
else
super
end
end
|
Instance Attribute Details
#queue_name ⇒ Object
Returns the value of attribute queue_name.
4
5
6
|
# File 'lib/resqueue-metadata/metadata.rb', line 4
def queue_name
@queue_name
end
|
Class Method Details
6
7
8
|
# File 'lib/resqueue-metadata/metadata.rb', line 6
def self.metadata_key queue_name
"metadata:#{queue_name}"
end
|
Instance Method Details
#respond_to?(meffod) ⇒ Boolean
26
27
28
29
|
# File 'lib/resqueue-metadata/metadata.rb', line 26
def respond_to? meffod
return true if hash_key.respond_to? meffod
super
end
|
#to_h ⇒ Object
14
15
16
|
# File 'lib/resqueue-metadata/metadata.rb', line 14
def to_h
hash_key.all
end
|