dmtd_vbmapp_data 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ef3de22b394a9f38623d19e37e454735c62233c
4
- data.tar.gz: 68ecded35b148276b8164157973e704809bb2700
3
+ metadata.gz: e1b4836d2ad5ddf9378b8c9dea86e4e196690b90
4
+ data.tar.gz: 840f7d9db92d589a520f127a7704537bb16f3cad
5
5
  SHA512:
6
- metadata.gz: e21f1c8d50f78dd979066980d79f511dcb48761bc02c4af84840e49b538413e2512254bdca93f166f0bb3f5b1fda65556c2d60dfccef6b205aa0b62240939f21
7
- data.tar.gz: 6d57356239945e9b72d7d5830e53ef1890529ddfceba40f426d89b702c8718f01d5174790f48cd7bc5c5dcb876ca341e6edcc2c441034ccd4da4430df236d93b
6
+ metadata.gz: 30cc82eee8ffd0953b699dd259cd277f25bed24736107a0f19e8739ebb0a63329e46c91bc4e879240aaf6e5cbdd90f55c2d10ac6b6d8f483f3e76584f502eea2
7
+ data.tar.gz: ade0fec6426a410f74a60c5ec29c9965bb888d6581e16c062ccdf3e5cbc6a15395a7058ee91421f9481fc3692a7c4352a7c751dfafc1fdc4109fc5f78028579f
@@ -49,6 +49,10 @@ module DmtdVbmappData
49
49
  # @return [Integer] the level number of the question (only when area == :milestones)
50
50
  attr_reader :level
51
51
 
52
+ # @!attribute [r] skills
53
+ # @return [Skill] the set of Task Analysis Skills for the question
54
+ attr_reader :skills
55
+
52
56
  # Creates an accessor for the VB-MAPP Area Question on the VB-MAPP Data Server
53
57
  #
54
58
  # @note This method does *not* block, simply creates an accessor and returns
@@ -73,6 +77,15 @@ module DmtdVbmappData
73
77
  @title = question_json[:title]
74
78
  @level = question_json[:level]
75
79
  @responses_json_array = question_json[:responses]
80
+
81
+ skills = question_json[:skills]
82
+ @skills = if skills.nil?
83
+ []
84
+ else
85
+ question_json[:skills].map do |skill|
86
+ ProtocolAreaSkill.new(question_json: skill)
87
+ end
88
+ end
76
89
  end
77
90
 
78
91
  # @note This method does *not* block.
@@ -0,0 +1,36 @@
1
+ require 'dmtd_vbmapp_data/request_helpers'
2
+
3
+ module DmtdVbmappData
4
+
5
+ # Provides for the retrieving of VB-MAPP Area Question Skill on the VB-MAPP Data Server.
6
+ class ProtocolAreaSkill
7
+
8
+ # @!attribute [r] id
9
+ # @return [Symbol] the Skill Id
10
+ attr_reader :id
11
+
12
+ # @!attribute [r] supporting
13
+ # @return [Bool] whether the skill is a supporting skill
14
+ attr_reader :supporting
15
+
16
+ # @!attribute [r] skill
17
+ # @return [String] the description of the skill
18
+ attr_reader :skill
19
+
20
+ # Creates an accessor for the VB-MAPP Area Question Skill on the VB-MAPP Data Server
21
+ #
22
+ # @note This method does *not* block, simply creates an accessor and returns
23
+ #
24
+ # @option opts [Hash] :question_json The vbmapp question json for the question in the format described at
25
+ # {https://datamtd.atlassian.net/wiki/pages/viewpage.action?pageId=18710549 /1/protocol/area_question - GET REST api - Fields}
26
+ def initialize(opts)
27
+ question_json = opts.fetch(:question_json)
28
+
29
+ @id = question_json[:id]
30
+ @supporting = question_json[:supporting]
31
+ @skill = question_json[:skill]
32
+ end
33
+
34
+ end
35
+
36
+ end
@@ -1,3 +1,3 @@
1
1
  module DmtdVbmappData
2
- VERSION = '1.3.1'.freeze
2
+ VERSION = '1.4.0'.freeze
3
3
  end
@@ -16,6 +16,7 @@ require 'dmtd_vbmapp_data/protocol_area'
16
16
  require 'dmtd_vbmapp_data/protocol_area_group'
17
17
  require 'dmtd_vbmapp_data/protocol_area_question'
18
18
  require 'dmtd_vbmapp_data/protocol_area_response'
19
+ require 'dmtd_vbmapp_data/protocol_area_skill'
19
20
 
20
21
  require 'dmtd_vbmapp_data/assessment_report'
21
22
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dmtd_vbmapp_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Hunt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-01 00:00:00.000000000 Z
11
+ date: 2019-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: psych
@@ -111,6 +111,7 @@ files:
111
111
  - lib/dmtd_vbmapp_data/protocol_area_group.rb
112
112
  - lib/dmtd_vbmapp_data/protocol_area_question.rb
113
113
  - lib/dmtd_vbmapp_data/protocol_area_response.rb
114
+ - lib/dmtd_vbmapp_data/protocol_area_skill.rb
114
115
  - lib/dmtd_vbmapp_data/request_helpers.rb
115
116
  - lib/dmtd_vbmapp_data/version.rb
116
117
  homepage: https://github.com/foscomputerservices/dmtd_vbmapp_data