Class: Estore::Commands::Ping

Inherits:
Object
  • Object
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

#callObject



6
7
8
9
10
# File 'lib/estore/commands/ping.rb', line 6

def call
  register!
  write('Ping')
  promise
end

#handleObject



12
13
14
15
# File 'lib/estore/commands/ping.rb', line 12

def handle(*)
  remove!
  promise.fulfill('Pong')
end