rixml 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rixml.rb +7 -5
  3. data/rixml.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe64331340a5f8adcf7138880b3ae7dd9feed396
4
- data.tar.gz: b01ad830ad052f03396a39dcb51a90eea80fe404
3
+ metadata.gz: b18fdbd91422325cb981369044b17ee46cdd0201
4
+ data.tar.gz: b05a6505d3473d5162361a1126d6d9507233291f
5
5
  SHA512:
6
- metadata.gz: 8c60f9ca93affbdec5e498a1352e3d7106d03c27186946acc40314f81bbc51ede6a182cd365943248fdfda596d6e73abef8886e66c7de180920687ef182eecb2
7
- data.tar.gz: 194bd2506825cd49253ba9388c3175d7bd973e8a81b07f7950bc431ca7185919ce9fce1e35dfbd02043cb4585d598dbc27b51d81e15d6bef1c02431852cdab06
6
+ metadata.gz: 271ef7e5317b2e41d8d019cf2ad36d920834e92922337da8dfad77ea95ffa5e9837709f3506b0e475dc5a026a1116854dc4a80308f067837a538e6b9a578b2e4
7
+ data.tar.gz: 23600a0bf97cee375dee8d25e3ce89721e31d3e6e836af3266f4eae92205da97f40fc773361db72203652ad9538584aa979c14f0ddacfe9c2e41ec1c03048c4e
data/lib/rixml.rb CHANGED
@@ -94,11 +94,13 @@ class RIXML
94
94
 
95
95
  def parse_companies_from_context(context)
96
96
  companies = []
97
- list = context['IssuerDetails'].try(:[], 'Issuer')
98
- return [] if list.nil?
99
- list = [list] unless list.is_a? Array
100
- list.select { |c| c['issuerType'] == 'Corporate' }.each do |company|
101
- companies << parse_company_info(company)
97
+ [context['IssuerDetails']].flatten.compact.each do |issuer|
98
+ list = issuer.try(:[], 'Issuer')
99
+ next if list.nil?
100
+ list = [list] unless list.is_a? Array
101
+ list.select { |c| c['issuerType'] == 'Corporate' }.each do |company|
102
+ companies << parse_company_info(company)
103
+ end
102
104
  end
103
105
  companies
104
106
  end
data/rixml.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'rixml'
4
- s.version = '0.1.0'
4
+ s.version = '0.1.1'
5
5
  s.date = '2016-12-01'
6
6
  s.summary = 'RIXML Parser'
7
7
  s.description = 'Parse RIXML files'
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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Correia Santos