Class: DmtdVbmappData::ProtocolAreaResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/dmtd_vbmapp_data/protocol_area_response.rb

Overview

Provides for the retrieving of VB-MAPP Protocol Area responses from the VB-MAPP Data Server.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ ProtocolAreaResponse

Note:

This method does not block, simply creates an accessor and returns

Creates an accessor for the VB-MAPP Area Question on the VB-MAPP Data Server

Parameters:

  • opts (Hash)

    a customizable set of options

Options Hash (opts):



31
32
33
34
35
36
37
38
# File 'lib/dmtd_vbmapp_data/protocol_area_response.rb', line 31

def initialize(opts)
  @area = opts.fetch(:area).to_sym

  response_json = opts.fetch(:response_json)
  @score = response_json[:score]
  @text = response_json[:text]
  @description = response_json[:description]
end

Instance Attribute Details

#areaObject (readonly)

Returns the value of attribute area.



10
11
12
# File 'lib/dmtd_vbmapp_data/protocol_area_response.rb', line 10

def area
  @area
end

#descriptionObject (readonly)

Returns the value of attribute description.



22
23
24
# File 'lib/dmtd_vbmapp_data/protocol_area_response.rb', line 22

def description
  @description
end

#scoreObject (readonly)

Returns the value of attribute score.



14
15
16
# File 'lib/dmtd_vbmapp_data/protocol_area_response.rb', line 14

def score
  @score
end

#textString (readonly)

Returns a description of the score to further help identify its application.

Returns:

  • (String)

    a description of the score to further help identify its application



18
19
20
# File 'lib/dmtd_vbmapp_data/protocol_area_response.rb', line 18

def text
  @text
end