parliament-grom-decorators 0.2.8 → 0.3.0

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: f2c51b3a198f567f42a6a78d9bfd6c9ec51c98dd
4
- data.tar.gz: 28e9f557ce7449d4c961afa44784173744c85c7a
3
+ metadata.gz: 9aa580be59d499c376ed65fcd8660bc8a38903e4
4
+ data.tar.gz: 0ae180d2b2341637557aecbcf346cf2aeaf3b8d4
5
5
  SHA512:
6
- metadata.gz: 85c9e3f6230973e7041ef4d64ce5659fb01e70765410a939ca5eecc2937547e92432e7698ccc3d28f3ad614f2c2477112fde89d52cf6f06c63c0c4376c47094f
7
- data.tar.gz: 662d5a03f27998e414713c710abff8d3a55076a82367aae2aaf09706b857fa3278c2f284e54536f7529b134b7befc4838cf7dd06067e7a5cead28e9854131566
6
+ metadata.gz: aa3aef044d6bcb8c9940b3c84d73f1f75b04f069fc81292e6c16c2f5011067354fddf4d3ceb3e12970f878c9b65a1804800b4c663a70d7d2b212e83462c46cdf
7
+ data.tar.gz: c7820078e6ff6bce645b07f6ec2298fd0ccabb0481af7aee810487f79538409cd62cf7460fdfcabdc505215758631bfe7720bbe6ede5f63b0c00ea1766112c21
@@ -3,6 +3,7 @@ require 'parliament/grom/decorator/helpers'
3
3
  require 'parliament/grom/decorator/constituency_area'
4
4
  require 'parliament/grom/decorator/constituency_group'
5
5
  require 'parliament/grom/decorator/contact_point'
6
+ require 'parliament/grom/decorator/european_region'
6
7
  require 'parliament/grom/decorator/gender'
7
8
  require 'parliament/grom/decorator/gender_identity'
8
9
  require 'parliament/grom/decorator/house'
@@ -0,0 +1,30 @@
1
+ module Parliament
2
+ module Grom
3
+ module Decorator
4
+ # Decorator namespace for Grom::Node instances with type: http://data.ordnancesurvey.co.uk/ontology/admingeo/EuropeanRegion.
5
+ # rubocop:disable ModuleLength
6
+ module EuropeanRegion
7
+ # Alias prefLabel with fallback.
8
+ #
9
+ # @return [String, String] the given name of the Grom::Node or an empty string.
10
+ def name
11
+ respond_to?(:prefLabel) ? prefLabel : ''
12
+ end
13
+
14
+ # Alias gssCode with fallback.
15
+ #
16
+ # @return [String, String] the given name of the Grom::Node or nil.
17
+ def gss_code
18
+ respond_to?(:gssCode) ? gssCode : nil
19
+ end
20
+
21
+ # Alias count with fallback.
22
+ #
23
+ # @return [String, String] the count of the Grom::Node or nil.
24
+ def constituency_count
25
+ respond_to?(:count) ? count : nil
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,7 +1,7 @@
1
1
  module Parliament
2
2
  module Grom
3
3
  module Decorator
4
- VERSION = '0.2.8'.freeze
4
+ VERSION = '0.3.0'.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.2.8
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rebecca Appleyard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-16 00:00:00.000000000 Z
11
+ date: 2017-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -174,6 +174,7 @@ files:
174
174
  - lib/parliament/grom/decorator/constituency_area.rb
175
175
  - lib/parliament/grom/decorator/constituency_group.rb
176
176
  - lib/parliament/grom/decorator/contact_point.rb
177
+ - lib/parliament/grom/decorator/european_region.rb
177
178
  - lib/parliament/grom/decorator/gender.rb
178
179
  - lib/parliament/grom/decorator/gender_identity.rb
179
180
  - lib/parliament/grom/decorator/helpers.rb