Class: Channel::ReceiveOnly
- Inherits:
-
Object
- Object
- Channel::ReceiveOnly
- Defined in:
- lib/channel.rb
Instance Method Summary collapse
- #close ⇒ Object
- #closed? ⇒ Boolean
- #hash ⇒ Object
-
#initialize(channel) ⇒ ReceiveOnly
constructor
A new instance of ReceiveOnly.
- #receive_only! ⇒ Object (also: #r!)
- #recv ⇒ Object (also: #pop)
- #send(_) ⇒ Object (also: #push)
- #send_only! ⇒ Object (also: #s!)
Constructor Details
#initialize(channel) ⇒ ReceiveOnly
111 112 113 |
# File 'lib/channel.rb', line 111 def initialize(channel) @channel = channel end |
Instance Method Details
#close ⇒ Object
126 127 128 |
# File 'lib/channel.rb', line 126 def close @channel.close end |
#closed? ⇒ Boolean
130 131 132 |
# File 'lib/channel.rb', line 130 def closed? @channel.closed? end |
#hash ⇒ Object
144 145 146 |
# File 'lib/channel.rb', line 144 def hash @channel.hash end |
#receive_only! ⇒ Object Also known as: r!
134 135 136 |
# File 'lib/channel.rb', line 134 def receive_only! self end |
#recv ⇒ Object Also known as: pop
115 116 117 |
# File 'lib/channel.rb', line 115 def recv @channel.recv end |
#send(_) ⇒ Object Also known as: push
120 121 122 |
# File 'lib/channel.rb', line 120 def send(_) fail Direction, 'receive only' end |
#send_only! ⇒ Object Also known as: s!
139 140 141 |
# File 'lib/channel.rb', line 139 def send_only! fail Conversion, 'receive only' end |