parliament-grom-decorators 0.15.0 → 0.16.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: be3dacd4062e4dc9326e431d22aa3b65d0b9cef8
4
- data.tar.gz: '0977acde11f0814aa880a882fff9f2440e6599da'
3
+ metadata.gz: 2ad523cd88d147de784b0b0aec4f69620706b2ec
4
+ data.tar.gz: cc19188a654963369a101b77b123cb6b1ee5dc1b
5
5
  SHA512:
6
- metadata.gz: f373ef8afe3937f03c196810f8f076b9d1510652ca4b84958fb0afd12738cb4fd6cc4b4a0d87a59d19e161ff964ba0df7c7259d81a86d0e439d330b8ee2fbb8f
7
- data.tar.gz: 95c9c06819db6c5db6b7c4e3fd84204c2b8322b0e8bae46bcf149ba64a12cf02f0d3637cc369e0eddfe75354276968ea35ad54850bf423116f38908febb07eb3
6
+ metadata.gz: 50eb95cf06896178db9128b10d00c49f1acacbc42733f51cf304dbdd49412121ac3ee966a048239b064776dc6a7a41b0be5c09ff89592dab4ff86276ff5c615f
7
+ data.tar.gz: 6157b14bfd09ac801fe2ba8262ca0142458e78a82a60af3b26103ebddf916147890108a39d5965d8481642d212f57d716ea0f160e07662f8d9ccce5900189bae
@@ -26,6 +26,7 @@ require 'parliament/grom/decorator/opposition_position'
26
26
  require 'parliament/grom/decorator/web_article'
27
27
  require 'parliament/grom/decorator/audience'
28
28
  require 'parliament/grom/decorator/article_type'
29
+ require 'parliament/grom/decorator/collection'
29
30
 
30
31
  # Namespace for classes and modules that handle connections to, and processing of data from the parliamentary API.
31
32
  # @since 0.1.0
@@ -0,0 +1,17 @@
1
+ module Parliament
2
+ module Grom
3
+ module Decorator
4
+ # Decorator namespace for Grom::Node instances with type: http://example.com/content/Collection
5
+ # Collection Grom::Node is a Contentful object associated with a web article (a WebArticle has an Audience node)
6
+ # Collection Grom::Node is not modelled in the data service, hence type 'http://example..' and not 'https://id.parliament.uk/schema'
7
+ module Collection
8
+ # Alias name with fallback.
9
+ #
10
+ # @return [String, String] the title of the Grom::Node or an empty string.
11
+ def collection_name
12
+ respond_to?(:name) ? name : ''
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,7 +1,7 @@
1
1
  module Parliament
2
2
  module Grom
3
3
  module Decorator
4
- VERSION = '0.15.0'.freeze
4
+ VERSION = '0.16.0'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parliament-grom-decorators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rebecca Appleyard
@@ -174,6 +174,7 @@ files:
174
174
  - lib/parliament/grom/decorator.rb
175
175
  - lib/parliament/grom/decorator/article_type.rb
176
176
  - lib/parliament/grom/decorator/audience.rb
177
+ - lib/parliament/grom/decorator/collection.rb
177
178
  - lib/parliament/grom/decorator/constituency_area.rb
178
179
  - lib/parliament/grom/decorator/constituency_group.rb
179
180
  - lib/parliament/grom/decorator/contact_point.rb