parliament-grom-decorators 0.27.5 → 0.27.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c23efc4e90c2b9df7cfa82e853695e6b57bc1fa
4
- data.tar.gz: c4bd6327bb0e5e46d23a9a04e6819fa5e9f26549
3
+ metadata.gz: c00e897763f3cce97ef6d88b2180cc712650d845
4
+ data.tar.gz: b0ab1f9a9eab0dfea9c9aa2744a2577c4c0c093f
5
5
  SHA512:
6
- metadata.gz: be15459c505baede49e33ed2fcf39bb592d3d39b8985e8965f37b86d44f3b908ee5a2045bb267ce223dd217b1d87e4e08e60f20a2bc8018533bce5b78d223159
7
- data.tar.gz: 3919535bda8dda268cad7096dc3c4dd9650f330ace27ab2b1c29443f30f4f77ec7fcbd1ebd0c69b9e992bac8c4250e6ebf0ccc9d1dae8054b1ce5187f49ac8ab
6
+ metadata.gz: d04614e8d27c48ed7e1fb3148a59dc2b4d03eb21f410d8d6fb47610e42cb1834693e38d9292de254711b21d9b95a055620c1d9f62164312192d393e6130b6bf7
7
+ data.tar.gz: bac7db42a799ae20f00ffa9fe0ba3b98d21c9350582a17a95d5cf4ce53713ecd2abc24e309ba763fbcfcdf548cc1b26d330bde11e2fe78a4552fd3d58b966250
@@ -25,6 +25,8 @@ require 'parliament/grom/decorator/group'
25
25
  require 'parliament/grom/decorator/house'
26
26
  require 'parliament/grom/decorator/house_seat'
27
27
  require 'parliament/grom/decorator/incumbency'
28
+ require 'parliament/grom/decorator/laying'
29
+ require 'parliament/grom/decorator/laying_body'
28
30
  require 'parliament/grom/decorator/member_image'
29
31
  require 'parliament/grom/decorator/parliamentary_incumbency'
30
32
  require 'parliament/grom/decorator/parliaments'
@@ -38,6 +40,7 @@ require 'parliament/grom/decorator/procedure_step'
38
40
  require 'parliament/grom/decorator/procedure'
39
41
  require 'parliament/grom/decorator/question'
40
42
  require 'parliament/grom/decorator/seat_incumbency'
43
+ require 'parliament/grom/decorator/statutory_instrument_paper'
41
44
  require 'parliament/grom/decorator/opposition_incumbency'
42
45
  require 'parliament/grom/decorator/opposition_position'
43
46
  require 'parliament/grom/decorator/web_article'
@@ -78,6 +81,8 @@ module Parliament
78
81
  'House' => House,
79
82
  'HouseSeat' => HouseSeat,
80
83
  'Incumbency' => Incumbency,
84
+ 'Laying' => Laying,
85
+ 'LayingBody' => LayingBody,
81
86
  'MemberImage' => MemberImage,
82
87
  'OppositionIncumbency' => OppositionIncumbency,
83
88
  'OppositionPosition' => OppositionPosition,
@@ -93,6 +98,7 @@ module Parliament
93
98
  'PostalAddress' => PostalAddress,
94
99
  'Question' => Question,
95
100
  'SeatIncumbency' => SeatIncumbency,
101
+ 'StatutoryInstrumentPaper' => StatutoryInstrumentPaper,
96
102
  'WebArticle' => WebArticle,
97
103
  'WorkPackage' => WorkPackage,
98
104
  'WorkPackageableThing' => WorkPackageableThing
@@ -0,0 +1,22 @@
1
+ module Parliament
2
+ module Grom
3
+ module Decorator
4
+ # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/Laying
5
+ module Laying
6
+ # Alias layingDate with fallback.
7
+ #
8
+ # @return [Date, nil] the date of the Grom::Node or nil.
9
+ def date
10
+ respond_to?(:layingDate) ? DateTime.parse(layingDate) : nil
11
+ end
12
+
13
+ # Alias layingHasLayingBody with fallback.
14
+ #
15
+ # @return [Grom::Node, nil] the LayingBody of the Grom::Node or nil.
16
+ def laying_body
17
+ respond_to?(:layingHasLayingBody) ? layingHasLayingBody.first : nil
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,15 @@
1
+ module Parliament
2
+ module Grom
3
+ module Decorator
4
+ # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/LayingBody
5
+ module LayingBody
6
+ # Alias groupName with fallback.
7
+ #
8
+ # @return [String, String] the name of the Grom::Node or an empty string.
9
+ def name
10
+ respond_to?(:groupName) ? groupName : ''
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -23,6 +23,13 @@ module Parliament
23
23
  def distance_from_origin
24
24
  respond_to?(:distance) ? distance.to_i : 0
25
25
  end
26
+
27
+ # Alias procedureStepDescription with fallback.
28
+ #
29
+ # @return [String, String] the description of the ProcedureStep Grom::Node.
30
+ def description
31
+ respond_to?(:procedureStepDescription) ? procedureStepDescription : ''
32
+ end
26
33
  end
27
34
  end
28
35
  end
@@ -0,0 +1,64 @@
1
+ module Parliament
2
+ module Grom
3
+ module Decorator
4
+ # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/StatutoryInstrumentPage
5
+ module StatutoryInstrumentPaper
6
+ # Alias statutoryInstrumentPaperName with fallback.
7
+ #
8
+ # @return [String, String] the name of the Grom::Node or an empty string.
9
+ def name
10
+ respond_to?(:statutoryInstrumentPaperName) ? statutoryInstrumentPaperName : ''
11
+ end
12
+
13
+ # Alias statutoryInstrumentPaperPrefix with fallback.
14
+ #
15
+ # @return [String, String] the prefix of the Grom::Node or an empty string.
16
+ def prefix
17
+ respond_to?(:statutoryInstrumentPaperPrefix) ? statutoryInstrumentPaperPrefix : ''
18
+ end
19
+
20
+ # Alias statutoryInstrumentPaperYear with fallback.
21
+ #
22
+ # @return [String, String] the year of the Grom::Node or an empty string.
23
+ def year
24
+ respond_to?(:statutoryInstrumentPaperYear) ? statutoryInstrumentPaperYear : ''
25
+ end
26
+
27
+ # Alias statutoryInstrumentPaperNumber with fallback.
28
+ #
29
+ # @return [String, String] the number of the Grom::Node or an empty string.
30
+ def number
31
+ respond_to?(:statutoryInstrumentPaperNumber) ? statutoryInstrumentPaperNumber : ''
32
+ end
33
+
34
+ # Alias statutoryInstrumentPaperComingIntoForceDate with fallback.
35
+ #
36
+ # @return [Date, nil] the coming into force date of the Grom::Node or an empty string.
37
+ def coming_into_force_date
38
+ respond_to?(:statutoryInstrumentPaperComingIntoForceDate) ? DateTime.parse(statutoryInstrumentPaperComingIntoForceDate) : nil
39
+ end
40
+
41
+ # Alias statutoryInstrumentPaperComingIntoForceNote with fallback.
42
+ #
43
+ # @return [String, String] the coming into force date of the Grom::Node or an empty string.
44
+ def coming_into_force_note
45
+ respond_to?(:statutoryInstrumentPaperComingIntoForceNote) ? statutoryInstrumentPaperComingIntoForceNote : ''
46
+ end
47
+
48
+ # Alias workPackagedThingHasWorkPackagedThingWebLink with fallback.
49
+ #
50
+ # @return [String, String] a web link to view the statutory instrument Grom::Node or an empty string.
51
+ def weblink
52
+ respond_to?(:workPackagedThingHasWorkPackagedThingWebLink) ? workPackagedThingHasWorkPackagedThingWebLink : ''
53
+ end
54
+
55
+ # Alias workPackagedThingHasWorkPackage with fallback.
56
+ #
57
+ # @return [Grom::Node, nil] a work package Grom::Node or an empty string.
58
+ def work_package
59
+ respond_to?(:workPackagedThingHasWorkPackage) ? workPackagedThingHasWorkPackage.first : nil
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -1,7 +1,7 @@
1
1
  module Parliament
2
2
  module Grom
3
3
  module Decorator
4
- VERSION = '0.27.5'.freeze
4
+ VERSION = '0.27.6'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parliament-grom-decorators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.5
4
+ version: 0.27.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rebecca Appleyard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-18 00:00:00.000000000 Z
11
+ date: 2018-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -200,6 +200,8 @@ files:
200
200
  - lib/parliament/grom/decorator/house.rb
201
201
  - lib/parliament/grom/decorator/house_seat.rb
202
202
  - lib/parliament/grom/decorator/incumbency.rb
203
+ - lib/parliament/grom/decorator/laying.rb
204
+ - lib/parliament/grom/decorator/laying_body.rb
203
205
  - lib/parliament/grom/decorator/member_image.rb
204
206
  - lib/parliament/grom/decorator/opposition_incumbency.rb
205
207
  - lib/parliament/grom/decorator/opposition_position.rb
@@ -215,6 +217,7 @@ files:
215
217
  - lib/parliament/grom/decorator/procedure_step.rb
216
218
  - lib/parliament/grom/decorator/question.rb
217
219
  - lib/parliament/grom/decorator/seat_incumbency.rb
220
+ - lib/parliament/grom/decorator/statutory_instrument_paper.rb
218
221
  - lib/parliament/grom/decorator/version.rb
219
222
  - lib/parliament/grom/decorator/web_article.rb
220
223
  - lib/parliament/grom/decorator/work_package.rb