Class: BSV::Overlay::LookupAnswer

Inherits:
Object
  • Object
show all
Defined in:
lib/bsv/overlay/types.rb

Overview

How the Overlay Services Engine responds to a LookupQuestion.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, outputs:) ⇒ LookupAnswer

Returns a new instance of LookupAnswer.

Parameters:

  • type (String)
  • outputs (Array)


74
75
76
77
# File 'lib/bsv/overlay/types.rb', line 74

def initialize(type:, outputs:)
  @type = type
  @outputs = outputs
end

Instance Attribute Details

#outputsArray (readonly)

Returns outputs or freeform response data from the Lookup Service.

Returns:

  • (Array)

    outputs or freeform response data from the Lookup Service



70
71
72
# File 'lib/bsv/overlay/types.rb', line 70

def outputs
  @outputs
end

#typeString (readonly)

Returns response type (e.g. ‘output-list’).

Returns:

  • (String)

    response type (e.g. ‘output-list’)



67
68
69
# File 'lib/bsv/overlay/types.rb', line 67

def type
  @type
end