Class: Bunny::RecordedBinding

Inherits:
RecordedEntity show all
Defined in:
lib/bunny/topology_registry.rb

Instance Attribute Summary collapse

Attributes inherited from RecordedEntity

#channel

Instance Method Summary collapse

Constructor Details

#initialize(ch) ⇒ RecordedBinding

Returns a new instance of RecordedBinding.



756
757
758
759
760
761
762
763
# File 'lib/bunny/topology_registry.rb', line 756

def initialize(ch)
  super ch

  @source = nil
  @destination = nil
  @routing_key = nil
  @arguments = Hash.new
end

Instance Attribute Details

#argumentsHash (readonly)

Returns:

  • (Hash)


754
755
756
# File 'lib/bunny/topology_registry.rb', line 754

def arguments
  @arguments
end

#destinationString (readonly)

Returns:

  • (String)


750
751
752
# File 'lib/bunny/topology_registry.rb', line 750

def destination
  @destination
end

#routing_keyString (readonly)

Returns:

  • (String)


752
753
754
# File 'lib/bunny/topology_registry.rb', line 752

def routing_key
  @routing_key
end

#sourceString (readonly)

Returns:

  • (String)


748
749
750
# File 'lib/bunny/topology_registry.rb', line 748

def source
  @source
end

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


801
802
803
804
805
806
807
# File 'lib/bunny/topology_registry.rb', line 801

def ==(other)
  other.class == self.class &&
    other.source == self.source &&
    other.destination == self.destination &&
    other.routing_key == self.routing_key &&
    other.arguments == self.arguments
end

#eql?(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


795
796
797
# File 'lib/bunny/topology_registry.rb', line 795

def eql?(other)
  self == other
end

#hashObject



789
790
791
# File 'lib/bunny/topology_registry.rb', line 789

def hash
  [self.class, @source, @destination, @routing_key, @arguments].hash
end

#with_arguments(value) ⇒ Object

Parameters:

  • value (Hash)


784
785
786
787
# File 'lib/bunny/topology_registry.rb', line 784

def with_arguments(value)
  @arguments = value
  self
end

#with_destination(value) ⇒ Object

Parameters:

  • value (String)


772
773
774
775
# File 'lib/bunny/topology_registry.rb', line 772

def with_destination(value)
  @destination = value
  self
end

#with_routing_key(value) ⇒ Object

Parameters:

  • value (String)


778
779
780
781
# File 'lib/bunny/topology_registry.rb', line 778

def with_routing_key(value)
  @routing_key = value
  self
end

#with_source(value) ⇒ Object

Parameters:

  • value (String)


766
767
768
769
# File 'lib/bunny/topology_registry.rb', line 766

def with_source(value)
  @source = value
  self
end