Class: Rex::Proto::Amqp::Version091::Types::AmqpVersion091FieldArray
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- Rex::Proto::Amqp::Version091::Types::AmqpVersion091FieldArray
- Defined in:
- lib/rex/proto/amqp/version_0_9_1/types.rb
Instance Method Summary collapse
-
#coerce ⇒ Array<Object>
Coerce the table into a Ruby array without the AMQP type metadata.
- #get ⇒ Object
- #set(v) ⇒ Object
Instance Method Details
#coerce ⇒ Array<Object>
Coerce the table into a Ruby array without the AMQP type metadata.
117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/rex/proto/amqp/version_0_9_1/types.rb', line 117 def coerce content.map do |item| case item.data_type when 'A'.ord # field-array item.data.coerce when 'F'.ord # field-table item.data.coerce else item.data.snapshot end end end |
#get ⇒ Object
106 107 108 |
# File 'lib/rex/proto/amqp/version_0_9_1/types.rb', line 106 def get self.content end |
#set(v) ⇒ Object
110 111 112 |
# File 'lib/rex/proto/amqp/version_0_9_1/types.rb', line 110 def set(v) self.content = v end |