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

Returns a new instance of Task.



92
93
94
95
# File 'lib/ciri/devp2p/server.rb', line 92

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



90
91
92
# File 'lib/ciri/devp2p/server.rb', line 90

def name
  @name
end

Instance Method Details

#call(*args) ⇒ Object



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

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