Class: ZMachine::Acceptor
- Inherits:
-
Object
- Object
- ZMachine::Acceptor
- Defined in:
- lib/zmachine/acceptor.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#callback ⇒ Object
readonly
Returns the value of attribute callback.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(channel, klass, *args) ⇒ Acceptor
constructor
A new instance of Acceptor.
- #unbind ⇒ Object
Constructor Details
#initialize(channel, klass, *args) ⇒ Acceptor
7 8 9 10 |
# File 'lib/zmachine/acceptor.rb', line 7 def initialize(channel, klass, *args ) @klass, @args, @callback = klass, args[0...-1], args.last @channel = channel end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
4 5 6 |
# File 'lib/zmachine/acceptor.rb', line 4 def args @args end |
#callback ⇒ Object (readonly)
Returns the value of attribute callback.
5 6 7 |
# File 'lib/zmachine/acceptor.rb', line 5 def callback @callback end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
3 4 5 |
# File 'lib/zmachine/acceptor.rb', line 3 def klass @klass end |
Instance Method Details
#close ⇒ Object
15 16 17 |
# File 'lib/zmachine/acceptor.rb', line 15 def close @channel.close end |
#unbind ⇒ Object
12 13 |
# File 'lib/zmachine/acceptor.rb', line 12 def unbind end |