Module: AMQP::Openable

Included in:
Entity, Session
Defined in:
lib/amqp/openable.rb

Defined Under Namespace

Classes: ImproperStatusError

Constant Summary collapse

VALUES =
[:opened, :closed, :opening, :closing].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statusObject

Returns the value of attribute status.



11
12
13
# File 'lib/amqp/openable.rb', line 11

def status
  @status
end

Instance Method Details

#closed!Object

opened!



44
45
46
# File 'lib/amqp/openable.rb', line 44

def closed!
  @status = :closed
end

#closed?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/amqp/openable.rb', line 25

def closed?
  @status == :closed
end

#closing!Object

opening!



54
55
56
# File 'lib/amqp/openable.rb', line 54

def closing!
  @status = :closing
end

#closing?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/amqp/openable.rb', line 35

def closing?
  @status == :closing
end

#opened!Object



40
41
42
# File 'lib/amqp/openable.rb', line 40

def opened!
  @status = :opened
end

#opened?Boolean Also known as: open?

Returns:

  • (Boolean)


20
21
22
# File 'lib/amqp/openable.rb', line 20

def opened?
  @status == :opened
end

#opening!Object



50
51
52
# File 'lib/amqp/openable.rb', line 50

def opening!
  @status = :opening
end

#opening?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/amqp/openable.rb', line 31

def opening?
  @status == :opening
end