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.



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

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.



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

def channel
  @channel
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

#serviceObject (readonly)

Returns the value of attribute service.



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

def service
  @service
end

Instance Method Details

#==(other) ⇒ Object



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

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