Class: Evrone::Common::AMQP::Formatter::Format

Inherits:
Object
  • Object
show all
Defined in:
lib/evrone/common/amqp/formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content_type) ⇒ Format

Returns a new instance of Format.



16
17
18
# File 'lib/evrone/common/amqp/formatter.rb', line 16

def initialize(content_type)
  @content_type = content_type
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



14
15
16
# File 'lib/evrone/common/amqp/formatter.rb', line 14

def content_type
  @content_type
end

Instance Method Details

#pack(&block) ⇒ Object



20
21
22
23
# File 'lib/evrone/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/evrone/common/amqp/formatter.rb', line 25

def unpack(&block)
  @unpack = block if block_given?
  @unpack
end