Class: Channel::SendOnly
- Inherits:
-
Object
- Object
- Channel::SendOnly
- Defined in:
- lib/channel.rb
Instance Method Summary collapse
- #close ⇒ Object
- #closed? ⇒ Boolean
- #hash ⇒ Object
-
#initialize(channel) ⇒ SendOnly
constructor
A new instance of SendOnly.
- #receive_only! ⇒ Object (also: #r!)
- #recv ⇒ Object (also: #pop)
- #send(val) ⇒ Object (also: #push)
- #send_only! ⇒ Object (also: #s!)
Constructor Details
#initialize(channel) ⇒ SendOnly
Returns a new instance of SendOnly.
150 151 152 |
# File 'lib/channel.rb', line 150 def initialize(channel) @channel = channel end |
Instance Method Details
#close ⇒ Object
165 166 167 |
# File 'lib/channel.rb', line 165 def close @channel.close end |
#closed? ⇒ Boolean
169 170 171 |
# File 'lib/channel.rb', line 169 def closed? @channel.closed? end |
#hash ⇒ Object
183 184 185 |
# File 'lib/channel.rb', line 183 def hash @channel.hash end |
#receive_only! ⇒ Object Also known as: r!
173 174 175 |
# File 'lib/channel.rb', line 173 def receive_only! fail Conversion, 'send only' end |
#recv ⇒ Object Also known as: pop
154 155 156 |
# File 'lib/channel.rb', line 154 def recv fail Direction, 'send only' end |
#send(val) ⇒ Object Also known as: push
159 160 161 |
# File 'lib/channel.rb', line 159 def send(val) @channel.send(val) end |
#send_only! ⇒ Object Also known as: s!
178 179 180 |
# File 'lib/channel.rb', line 178 def send_only! self end |