Class: Estore::Commands::Ping
- Inherits:
-
Object
- Object
- Estore::Commands::Ping
show all
- Includes:
- Command
- Defined in:
- lib/estore/commands/ping.rb
Instance Attribute Summary
Attributes included from Command
#uuid
Instance Method Summary
collapse
Methods included from Command
#initialize, #promise, #register!, #reject!, #remove!, #write
Instance Method Details
#call ⇒ Object
6
7
8
9
10
|
# File 'lib/estore/commands/ping.rb', line 6
def call
register!
write('Ping')
promise
end
|
#handle ⇒ Object
12
13
14
15
|
# File 'lib/estore/commands/ping.rb', line 12
def handle(*)
remove!
promise.fulfill('Pong')
end
|