parliament-ruby 0.2.1 → 0.2.2

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: ff75c94a11fda9a042d4060e4f3c783f69bbed88
4
- data.tar.gz: b71eaa4c8b334182313f055214c33956c7f9e01f
3
+ metadata.gz: 63cb4e6e7ca62229a124c56cf06412dd4c407041
4
+ data.tar.gz: 53ccb2eefa3b5e598c77bb4ab95af950afc92a51
5
5
  SHA512:
6
- metadata.gz: 30c5a0245be4f796d5bb21366d83026f0b3d66eb26848d2d38e15919fd0727cd1e9e95a966fc7ea18d0e191bd964f919f766e89821eb63e1d26688580f0af29c
7
- data.tar.gz: 2a7e5c955c09ce45f9e792edf9f066dbee83614cdca78dec5f7fa9467d987a69045cc4d4d16cdec91cb90b545ddda6e9c084c2390002c137f17eb70ae8e3c57d
6
+ metadata.gz: e50b189e5f781920d786690000d39bbec200e9952b093b8da1d59603c3da495f0187f22486b81141ac4c5374fe739eda3cf7a3c572c9b233efa364728adad64e
7
+ data.tar.gz: ec769fd1a642e11af0c2d505cc24844aeda6e13aec5feb660b19dbb0744f3f0ca59d57e401dc1697acf3a89f94ebe5aef4b77c7333259c9825bf2849c4beb813
@@ -12,6 +12,12 @@ module Parliament
12
12
  def end_date
13
13
  respond_to?(:partyMembershipEndDate) ? DateTime.parse(partyMembershipEndDate) : nil
14
14
  end
15
+
16
+ def current?
17
+ has_end_date = respond_to?(:partyMembershipEndDate)
18
+
19
+ !has_end_date
20
+ end
15
21
  end
16
22
  end
17
23
  end
@@ -5,7 +5,7 @@ module Parliament
5
5
  include Enumerable
6
6
  extend Forwardable
7
7
  attr_reader :nodes
8
- def_delegators :@nodes, :size, :each, :select, :map, :select!, :map!, :count, :length, :[]
8
+ def_delegators :@nodes, :size, :each, :select, :map, :select!, :map!, :count, :length, :[], :empty?
9
9
 
10
10
  def initialize(nodes)
11
11
  @nodes = nodes
@@ -1,3 +1,3 @@
1
1
  module Parliament
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parliament-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Rayner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-14 00:00:00.000000000 Z
11
+ date: 2017-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grom