Class: Copilot::PingResponse

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

Ping response from the server.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



330
331
332
# File 'lib/copilot/types.rb', line 330

def message
  @message
end

#protocol_versionObject

Returns the value of attribute protocol_version

Returns:

  • (Object)

    the current value of protocol_version



330
331
332
# File 'lib/copilot/types.rb', line 330

def protocol_version
  @protocol_version
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



330
331
332
# File 'lib/copilot/types.rb', line 330

def timestamp
  @timestamp
end

Class Method Details

.from_hash(h) ⇒ Object



331
332
333
334
335
336
337
# File 'lib/copilot/types.rb', line 331

def self.from_hash(h)
  new(
    message: h["message"],
    timestamp: h["timestamp"],
    protocol_version: h["protocolVersion"]
  )
end