Class: Travis::Notifications::Worker::Queue

Inherits:
Object
  • Object
show all
Defined in:
lib/travis/notifications/worker/queue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#languageObject (readonly)

Returns the value of attribute language.



5
6
7
# File 'lib/travis/notifications/worker/queue.rb', line 5

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/travis/notifications/worker/queue.rb', line 5

def name
  @name
end

#slugObject (readonly)

Returns the value of attribute slug.



5
6
7
# File 'lib/travis/notifications/worker/queue.rb', line 5

def slug
  @slug
end

#targetObject (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

Returns:

  • (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

#queueObject



15
16
17
# File 'lib/travis/notifications/worker/queue.rb', line 15

def queue
  name
end