Class: Ciri::DevP2P::Server::Task
- Inherits:
-
Object
- Object
- Ciri::DevP2P::Server::Task
- Defined in:
- lib/ciri/devp2p/server.rb
Overview
scheduler task
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(name:, &blk) ⇒ Task
constructor
A new instance of Task.
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
#name ⇒ Object (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 |