Class: Vx::Consumer::Params

Inherits:
Struct
  • Object
show all
Defined in:
lib/vx/consumer/params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ackObject

Returns the value of attribute ack.



9
10
11
# File 'lib/vx/consumer/params.rb', line 9

def ack
  @ack
end

#consumer_classObject

Returns the value of attribute consumer_class

Returns:

  • (Object)

    the current value of consumer_class



3
4
5
# File 'lib/vx/consumer/params.rb', line 3

def consumer_class
  @consumer_class
end

#content_typeObject

Returns the value of attribute content_type.



8
9
10
# File 'lib/vx/consumer/params.rb', line 8

def content_type
  @content_type
end

#exchange_nameObject

Returns the value of attribute exchange_name.



5
6
7
# File 'lib/vx/consumer/params.rb', line 5

def exchange_name
  @exchange_name
end

#exchange_optionsObject

Returns the value of attribute exchange_options.



5
6
7
# File 'lib/vx/consumer/params.rb', line 5

def exchange_options
  @exchange_options
end

#exchange_typeObject

Returns the value of attribute exchange_type.



10
11
12
# File 'lib/vx/consumer/params.rb', line 10

def exchange_type
  @exchange_type
end

#headersObject

Returns the value of attribute headers.



7
8
9
# File 'lib/vx/consumer/params.rb', line 7

def headers
  @headers
end

#modelObject

Returns the value of attribute model.



11
12
13
# File 'lib/vx/consumer/params.rb', line 11

def model
  @model
end

#queue_nameObject

Returns the value of attribute queue_name.



6
7
8
# File 'lib/vx/consumer/params.rb', line 6

def queue_name
  @queue_name
end

#queue_optionsObject

Returns the value of attribute queue_options.



6
7
8
# File 'lib/vx/consumer/params.rb', line 6

def queue_options
  @queue_options
end

#routing_keyObject

Returns the value of attribute routing_key.



7
8
9
# File 'lib/vx/consumer/params.rb', line 7

def routing_key
  @routing_key
end

Instance Method Details

#bind_optionsObject



45
46
47
48
49
50
# File 'lib/vx/consumer/params.rb', line 45

def bind_options
  opts = { }
  opts.merge!(routing_key: routing_key) if routing_key
  opts.merge!(headers: headers) if headers
  opts
end

#consumer_nameObject



52
53
54
# File 'lib/vx/consumer/params.rb', line 52

def consumer_name
  consumer_class.to_s
end

#publish_optionsObject



41
42
43
# File 'lib/vx/consumer/params.rb', line 41

def publish_options
  config.default_publish_options
end