rixml 0.5.6 → 0.5.8

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: d2c991efe312a7f413992fc9b2bb04c279a84a08
4
- data.tar.gz: b9bdbac243e41719b5e6a889dc933b22e0cfba67
3
+ metadata.gz: 6c60586519be43a5fb0669683e4d47d2c5a7594a
4
+ data.tar.gz: b5722d8668141350d01db9b2cf7c87f4cf5fd580
5
5
  SHA512:
6
- metadata.gz: b4d8adecbe395cb6d2f91fd390f81b98bdcfeb451d2d486cb943d563551f0a6d8686351b4f87cc823ec1caf00b24ed4e21a4f6043df9ccb47e17a14d727fcd4c
7
- data.tar.gz: 475aef3beede6232490994d74e23a6d90d717ffeaacb4e45ff83111aaa26d76a601d3a4042a8772d668a914730256baf4cc4e44e789ebb28ef7e57002e9c27c5
6
+ metadata.gz: cf8eb2d736839e514805f96b965537b14b5f270080843f378f4e685267a01f39583c998b2ea7393f3ad20e3930c9d24b3d1a7424cdfeb51abc226ace7bcf3b71
7
+ data.tar.gz: 5fe517b958e989cab5f2ffa8a09128501139bd3e2472ec04ed7f8585da4e9fb9623065ccf54fbdfeeb03e06ff1425c6fa6a85446c166f76fd58ecaaa0683d346
data/.rspec CHANGED
@@ -1 +1,2 @@
1
1
  --require spec_helper
2
+ --format documentation
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rixml (0.5.6)
4
+ rixml (0.0.0)
5
5
  activesupport (>= 4.0.0)
6
6
  nokogiri (~> 1.5)
7
7
  nokogiri-happymapper (~> 0.6.0)
@@ -18,8 +18,7 @@ GEM
18
18
  byebug (9.0.6)
19
19
  concurrent-ruby (1.0.5)
20
20
  diff-lcs (1.3)
21
- i18n (0.9.0)
22
- concurrent-ruby (~> 1.0)
21
+ i18n (0.8.6)
23
22
  mini_portile2 (2.3.0)
24
23
  minitest (5.10.1)
25
24
  nokogiri (1.8.1)
@@ -24,7 +24,7 @@ module RixmlDocument
24
24
  attribute :external, RixmlType::YesNoBoolean
25
25
 
26
26
  def issuers
27
- issuer_details.issuers
27
+ issuer_details&.issuers || []
28
28
  end
29
29
  end
30
30
  end
@@ -10,5 +10,9 @@ module RixmlDocument
10
10
 
11
11
  attribute :length_unit, RixmlType::NormalizedString, tag: 'lengthUnit'
12
12
  content :value, String
13
+
14
+ def pages?
15
+ length_unit == 'pages'
16
+ end
13
17
  end
14
18
  end
@@ -19,5 +19,9 @@ module RixmlDocument
19
19
 
20
20
  attribute :product_id, String, tag: 'productID'
21
21
  attribute :event_indicator, RixmlType::YesNoBoolean, tag: 'eventIndicator'
22
+
23
+ def current_status_info
24
+ status_infos.find(&:current_status_indicator)
25
+ end
22
26
  end
23
27
  end
@@ -21,5 +21,11 @@ module RixmlDocument
21
21
 
22
22
  element :mime_type, String, tag: 'MIMEType'
23
23
  element :name, String, tag: 'Name'
24
+
25
+ def number_of_pages
26
+ return if length.nil?
27
+
28
+ length.value if length.pages?
29
+ end
24
30
  end
25
31
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'rixml'
4
- s.version = '0.5.6'
5
- s.date = '2017-10-22'
4
+ s.version = '0.5.8'
5
+ s.date = '2017-10-26'
6
6
  s.summary = 'RIXML Parser'
7
7
  s.description = 'Parse RIXML files'
8
8
  s.homepage = 'https://github.com/AlphaExchange/rixml'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rixml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Correia Santos
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-22 00:00:00.000000000 Z
12
+ date: 2017-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler