Class: Travis::Notifications::Worker::Queue
- Inherits:
-
Object
- Object
- Travis::Notifications::Worker::Queue
- Defined in:
- lib/travis/notifications/worker/queue.rb
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Queue
constructor
A new instance of Queue.
- #matches?(slug, target, language) ⇒ Boolean
- #queue ⇒ Object
Constructor Details
#initialize(*args) ⇒ Queue
Returns a new instance of Queue.
7 8 9 |
# File 'lib/travis/notifications/worker/queue.rb', line 7 def initialize(*args) @name, @slug, @target, @language = *args end |
Instance Attribute Details
#language ⇒ Object (readonly)
Returns the value of attribute language.
5 6 7 |
# File 'lib/travis/notifications/worker/queue.rb', line 5 def language @language end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/travis/notifications/worker/queue.rb', line 5 def name @name end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
5 6 7 |
# File 'lib/travis/notifications/worker/queue.rb', line 5 def slug @slug end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
5 6 7 |
# File 'lib/travis/notifications/worker/queue.rb', line 5 def target @target end |
Instance Method Details
#matches?(slug, target, language) ⇒ Boolean
11 12 13 |
# File 'lib/travis/notifications/worker/queue.rb', line 11 def matches?(slug, target, language) matches_slug?(slug) || matches_language?(language) # || matches_target?(target) end |
#queue ⇒ Object
15 16 17 |
# File 'lib/travis/notifications/worker/queue.rb', line 15 def queue name end |