Class: JSONRPC::Request

Inherits:
SmartCore::ValueObject
  • Object
show all
Defined in:
lib/jsonrpc/request.rb

Overview

Since:

  • 0.1.0

Constant Summary collapse

Schema =

Returns:

  • (SmartCore::Schema)

Since:

  • 0.1.0

Class.new(SmartCore::Schema) do
  schema do
    required(:jsonrpc).type(:string).filled
    required(:method).type(:string).filled
    required(:params).type(:hash).filled
    required(:id).type(:string).filled
  end
end.new

Instance Method Summary collapse

Instance Method Details

#notification?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0



39
# File 'lib/jsonrpc/request.rb', line 39

def notification? = false

#request?Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0



45
# File 'lib/jsonrpc/request.rb', line 45

def request? = true