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



332
333
334
# File 'lib/copilot/types.rb', line 332

def message
  @message
end

#protocol_versionObject

Returns the value of attribute protocol_version

Returns:

  • (Object)

    the current value of protocol_version



332
333
334
# File 'lib/copilot/types.rb', line 332

def protocol_version
  @protocol_version
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



332
333
334
# File 'lib/copilot/types.rb', line 332

def timestamp
  @timestamp
end

Class Method Details

.from_hash(h) ⇒ Object



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

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