Class: Reqless::QueuePriorityPattern
- Inherits:
-
Object
- Object
- Reqless::QueuePriorityPattern
- Defined in:
- lib/reqless/queue_priority_pattern.rb
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
-
#should_distribute_fairly ⇒ Object
readonly
Returns the value of attribute should_distribute_fairly.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(pattern, should_distribute_fairly = false) ⇒ QueuePriorityPattern
constructor
A new instance of QueuePriorityPattern.
Constructor Details
#initialize(pattern, should_distribute_fairly = false) ⇒ QueuePriorityPattern
Returns a new instance of QueuePriorityPattern.
5 6 7 8 |
# File 'lib/reqless/queue_priority_pattern.rb', line 5 def initialize(pattern, should_distribute_fairly = false) @pattern = pattern @should_distribute_fairly = should_distribute_fairly end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
3 4 5 |
# File 'lib/reqless/queue_priority_pattern.rb', line 3 def pattern @pattern end |
#should_distribute_fairly ⇒ Object (readonly)
Returns the value of attribute should_distribute_fairly.
3 4 5 |
# File 'lib/reqless/queue_priority_pattern.rb', line 3 def should_distribute_fairly @should_distribute_fairly end |
Instance Method Details
#==(other) ⇒ Object
10 11 12 13 14 |
# File 'lib/reqless/queue_priority_pattern.rb', line 10 def ==(other) return self.class == other.class && self.pattern.join == other.pattern.join && self.should_distribute_fairly == other.should_distribute_fairly end |