Class: LanguageServer::Protocol::Interface::ExecutionSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/execution_summary.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(execution_order:, success: nil) ⇒ ExecutionSummary

Returns a new instance of ExecutionSummary.



5
6
7
8
9
10
11
12
# File 'lib/language_server/protocol/interface/execution_summary.rb', line 5

def initialize(execution_order:, success: nil)
  @attributes = {}

  @attributes[:executionOrder] = execution_order
  @attributes[:success] = success if success

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



33
34
35
# File 'lib/language_server/protocol/interface/execution_summary.rb', line 33

def attributes
  @attributes
end

Instance Method Details

#execution_ordernumber

A strict monotonically increasing value indicating the execution order of a cell inside a notebook.

Returns:

  • (number)


20
21
22
# File 'lib/language_server/protocol/interface/execution_summary.rb', line 20

def execution_order
  attributes.fetch(:executionOrder)
end

#successboolean

Whether the execution was successful or not if known by the client.

Returns:

  • (boolean)


29
30
31
# File 'lib/language_server/protocol/interface/execution_summary.rb', line 29

def success
  attributes.fetch(:success)
end

#to_hashObject



35
36
37
# File 'lib/language_server/protocol/interface/execution_summary.rb', line 35

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



39
40
41
# File 'lib/language_server/protocol/interface/execution_summary.rb', line 39

def to_json(*args)
  to_hash.to_json(*args)
end