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.



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

def initialize(ch)
  super ch

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

Instance Attribute Details

#argumentsHash (readonly)

Returns:

  • (Hash)


756
757
758
# File 'lib/bunny/topology_registry.rb', line 756

def arguments
  @arguments
end

#destinationString (readonly)

Returns:

  • (String)


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

def destination
  @destination
end

#routing_keyString (readonly)

Returns:

  • (String)


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

def routing_key
  @routing_key
end

#sourceString (readonly)

Returns:

  • (String)


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

def source
  @source
end

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


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

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)


797
798
799
# File 'lib/bunny/topology_registry.rb', line 797

def eql?(other)
  self == other
end

#hashObject



791
792
793
# File 'lib/bunny/topology_registry.rb', line 791

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

#with_arguments(value) ⇒ Object

Parameters:

  • value (Hash)


786
787
788
789
# File 'lib/bunny/topology_registry.rb', line 786

def with_arguments(value)
  @arguments = value
  self
end

#with_destination(value) ⇒ Object

Parameters:

  • value (String)


774
775
776
777
# File 'lib/bunny/topology_registry.rb', line 774

def with_destination(value)
  @destination = value
  self
end

#with_routing_key(value) ⇒ Object

Parameters:

  • value (String)


780
781
782
783
# File 'lib/bunny/topology_registry.rb', line 780

def with_routing_key(value)
  @routing_key = value
  self
end

#with_source(value) ⇒ Object

Parameters:

  • value (String)


768
769
770
771
# File 'lib/bunny/topology_registry.rb', line 768

def with_source(value)
  @source = value
  self
end