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

Inherits:
Foobara::Command show all
Defined in:
foobara-0.6.1/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 TruncatedInspect

#inspect, truncating

Methods included from Foobara::Concern

foobara_class_methods_module_for, foobara_concern?, included

Instance Attribute Details

#pongObject

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

#executeObject



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

def execute
  set_pong

  pong
end

#set_pongObject



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

def set_pong
  self.pong = Time.now
end