Class: Shoryuken::Polling::QueueConfiguration

Inherits:
Struct
  • Object
show all
Defined in:
lib/shoryuken/polling/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



3
4
5
# File 'lib/shoryuken/polling/base.rb', line 3

def name
  @name
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



3
4
5
# File 'lib/shoryuken/polling/base.rb', line 3

def options
  @options
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/shoryuken/polling/base.rb', line 8

def ==(other)
  case other
  when String
    if options.empty?
      name == other
    else
      false
    end
  else
    super
  end
end

#hashObject



4
5
6
# File 'lib/shoryuken/polling/base.rb', line 4

def hash
  name.hash
end

#to_sObject



23
24
25
26
27
28
29
# File 'lib/shoryuken/polling/base.rb', line 23

def to_s
  if options.empty?
    name
  else
    "#<QueueConfiguration #{name} options=#{options.inspect}>"
  end
end