Module: AMQ::Client::Openable

Included in:
Async::Adapter, Async::Entity
Defined in:
lib/amq/client/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.



14
15
16
# File 'lib/amq/client/openable.rb', line 14

def status
  @status
end

Instance Method Details

#closed!Object

opened!



47
48
49
# File 'lib/amq/client/openable.rb', line 47

def closed!
  @status = :closed
end

#closed?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/amq/client/openable.rb', line 28

def closed?
  @status == :closed
end

#closing!Object

opening!



57
58
59
# File 'lib/amq/client/openable.rb', line 57

def closing!
  @status = :closing
end

#closing?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/amq/client/openable.rb', line 38

def closing?
  @status == :closing
end

#opened!Object



43
44
45
# File 'lib/amq/client/openable.rb', line 43

def opened!
  @status = :opened
end

#opened?Boolean Also known as: open?

Returns:

  • (Boolean)


23
24
25
# File 'lib/amq/client/openable.rb', line 23

def opened?
  @status == :opened
end

#opening!Object



53
54
55
# File 'lib/amq/client/openable.rb', line 53

def opening!
  @status = :opening
end

#opening?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/amq/client/openable.rb', line 34

def opening?
  @status == :opening
end