Class: Qpid::Proton::Described
- Inherits:
-
Object
- Object
- Qpid::Proton::Described
- Defined in:
- lib/qpid_proton/described.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#descriptor ⇒ Object
readonly
Returns the value of attribute descriptor.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#==(that) ⇒ Object
:nodoc:.
-
#initialize(descriptor, value) ⇒ Described
constructor
A new instance of Described.
-
#put(data) ⇒ Object
Puts the description into the Data object.
-
#to_s ⇒ Object
:nodoc:.
Constructor Details
#initialize(descriptor, value) ⇒ Described
Returns a new instance of Described.
29 30 31 32 |
# File 'lib/qpid_proton/described.rb', line 29 def initialize(descriptor, value) @descriptor = descriptor @value = value end |
Instance Attribute Details
#descriptor ⇒ Object (readonly)
Returns the value of attribute descriptor.
26 27 28 |
# File 'lib/qpid_proton/described.rb', line 26 def descriptor @descriptor end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
27 28 29 |
# File 'lib/qpid_proton/described.rb', line 27 def value @value end |
Instance Method Details
#==(that) ⇒ Object
:nodoc:
52 53 54 55 56 |
# File 'lib/qpid_proton/described.rb', line 52 def ==(that) # :nodoc: (that.is_a?(Qpid::Proton::Described) && (self.descriptor == that.descriptor) && (self.value == that.value)) end |
#put(data) ⇒ Object
47 48 49 50 |
# File 'lib/qpid_proton/described.rb', line 47 def put(data) data.symbol = @descriptor data.string = @value end |
#to_s ⇒ Object
:nodoc:
58 59 60 |
# File 'lib/qpid_proton/described.rb', line 58 def to_s # :nodoc: "descriptor=#{descriptor} value=#{value}" end |