Class: DispatchRider::Publisher::Configuration::Destination

Inherits:
Object
  • Object
show all
Defined in:
lib/dispatch-rider/publisher/configuration/destination.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, attributes = {}) ⇒ Destination

Returns a new instance of Destination.



5
6
7
8
9
10
11
12
# File 'lib/dispatch-rider/publisher/configuration/destination.rb', line 5

def initialize(name, attributes={})
  @name = name

  attributes = attributes.with_indifferent_access
  @service = attributes[:service]
  @channel = attributes[:channel]
  @options = attributes[:options]
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



14
15
16
# File 'lib/dispatch-rider/publisher/configuration/destination.rb', line 14

def channel
  @channel
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/dispatch-rider/publisher/configuration/destination.rb', line 14

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



14
15
16
# File 'lib/dispatch-rider/publisher/configuration/destination.rb', line 14

def options
  @options
end

#serviceObject (readonly)

Returns the value of attribute service.



14
15
16
# File 'lib/dispatch-rider/publisher/configuration/destination.rb', line 14

def service
  @service
end

Instance Method Details

#==(other) ⇒ Object



16
17
18
19
20
21
# File 'lib/dispatch-rider/publisher/configuration/destination.rb', line 16

def ==(other)
  name == other.name &&
    service == other.service &&
    channel == other.channel &&
    options == other.options
end