Class: Foobara::CommandConnector::Commands::Ping

Inherits:
Foobara::Command show all
Defined in:
foobara-0.7.3/projects/command_connectors/src/command_connector/commands/ping.rb

Constant Summary

Constants included from TruncatedInspect

TruncatedInspect::MAX_LENGTH

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Foobara::Command

install!

Methods included from Foobara::CommandPatternImplementation

install_state_machine_callback_methods

Methods included from TruncatedInspect

#inspect, truncating

Methods included from Foobara::Concern

foobara_class_methods_module_for, foobara_concern?, included

Instance Attribute Details

#pong ⇒ Object

Returns the value of attribute pong.



13
14
15
# File 'projects/command_connectors/src/command_connector/commands/ping.rb', line 13

def pong
  @pong
end

Instance Method Details

#execute ⇒ Object



7
8
9
10
11
# File 'projects/command_connectors/src/command_connector/commands/ping.rb', line 7

def execute
  set_pong

  pong
end

#set_pong ⇒ Object



15
16
17
# File 'projects/command_connectors/src/command_connector/commands/ping.rb', line 15

def set_pong
  self.pong = Time.now
end