Class: Qpid::Proton::Types::Described
- Inherits:
-
Object
- Object
- Qpid::Proton::Types::Described
- Defined in:
- lib/types/described.rb
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.
28 29 30 31 |
# File 'lib/types/described.rb', line 28 def initialize(descriptor, value) @descriptor = descriptor @value = value end |
Instance Attribute Details
#descriptor ⇒ Object (readonly)
Returns the value of attribute descriptor.
25 26 27 |
# File 'lib/types/described.rb', line 25 def descriptor @descriptor end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
26 27 28 |
# File 'lib/types/described.rb', line 26 def value @value end |
Instance Method Details
#==(that) ⇒ Object
:nodoc:
51 52 53 54 55 |
# File 'lib/types/described.rb', line 51 def ==(that) # :nodoc: (that.is_a?(Qpid::Proton::Types::Described) && (self.descriptor == that.descriptor) && (self.value == that.value)) end |
#put(data) ⇒ Object
46 47 48 49 |
# File 'lib/types/described.rb', line 46 def put(data) data.symbol = @descriptor data.string = @value end |
#to_s ⇒ Object
:nodoc:
57 58 59 |
# File 'lib/types/described.rb', line 57 def to_s # :nodoc: "descriptor=#{descriptor} value=#{value}" end |