Class: Ciri::DevP2P::Server::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/ciri/devp2p/server.rb

Overview

scheduler task

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, &blk) ⇒ Task


97
98
99
100
# File 'lib/ciri/devp2p/server.rb', line 97

def initialize(name:, &blk)
  @name = name
  @blk = blk
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name


95
96
97
# File 'lib/ciri/devp2p/server.rb', line 95

def name
  @name
end

Instance Method Details

#call(*args) ⇒ Object


102
103
104
# File 'lib/ciri/devp2p/server.rb', line 102

def call(*args)
  @blk.call(*args)
end