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.



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

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.



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

def channel
  @channel
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

#serviceObject (readonly)

Returns the value of attribute service.



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

def service
  @service
end

Instance Method Details

#==(other) ⇒ Object



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

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