Class: Vx::Common::AMQP::Formatter::Format
- Inherits:
-
Object
- Object
- Vx::Common::AMQP::Formatter::Format
- Defined in:
- lib/vx/common/amqp/formatter.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
Instance Method Summary collapse
-
#initialize(content_type) ⇒ Format
constructor
A new instance of Format.
- #pack(&block) ⇒ Object
- #unpack(&block) ⇒ Object
Constructor Details
#initialize(content_type) ⇒ Format
Returns a new instance of Format.
16 17 18 |
# File 'lib/vx/common/amqp/formatter.rb', line 16 def initialize(content_type) @content_type = content_type end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
14 15 16 |
# File 'lib/vx/common/amqp/formatter.rb', line 14 def content_type @content_type end |
Instance Method Details
#pack(&block) ⇒ Object
20 21 22 23 |
# File 'lib/vx/common/amqp/formatter.rb', line 20 def pack(&block) @pack = block if block_given? @pack end |
#unpack(&block) ⇒ Object
25 26 27 28 |
# File 'lib/vx/common/amqp/formatter.rb', line 25 def unpack(&block) @unpack = block if block_given? @unpack end |