Class: ZMachine::Acceptor

Inherits:
Object
  • Object
show all
Defined in:
lib/zmachine/acceptor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#argsObject (readonly)

Returns the value of attribute args.



4
5
6
# File 'lib/zmachine/acceptor.rb', line 4

def args
  @args
end

#callbackObject (readonly)

Returns the value of attribute callback.



5
6
7
# File 'lib/zmachine/acceptor.rb', line 5

def callback
  @callback
end

#klassObject (readonly)

Returns the value of attribute klass.



3
4
5
# File 'lib/zmachine/acceptor.rb', line 3

def klass
  @klass
end

Instance Method Details

#closeObject



15
16
17
# File 'lib/zmachine/acceptor.rb', line 15

def close
  @channel.close
end

#unbindObject



12
13
# File 'lib/zmachine/acceptor.rb', line 12

def unbind
end