brasil-estados 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/brasil-estados/estado.rb +2 -10
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc106892731e28c4ea7a23dbe768df5e72b30c2a
4
- data.tar.gz: 4fb269f0b9fa0b0025cab2cb88d277d42e8a2434
3
+ metadata.gz: ef12296f5dbcc62a62b50de760e046de4ed754e7
4
+ data.tar.gz: 0f9c082baa66294a60eb0ee694e8c2172a014e93
5
5
  SHA512:
6
- metadata.gz: bc3e57d9ede2a588aa142303a99390d1ff08191c0d4e3e551bd0515c36c940a79ef1886fcd7a9bb8829e5c36e4c2db1ec35af66857dac929215817b96e7548a4
7
- data.tar.gz: 71ce20501b7ac00ec63eb2e12afeb5bd7a6070615feffc7e11c23fd2c21c767463170d3bd4e61510f2d13687f925627eec9ffc85b3672d6750ed6ed33994c1de
6
+ metadata.gz: 516d3d3f4892ecbc6cf480387c2f6d967d548fddf4eb47049355da5aa613f68415b744b2397ca874c46c295b508f16291efacf303628cedd446a4fc64bfcf502
7
+ data.tar.gz: fe4e21dc4d9ebd648604759ae44f99f1743ba2dae49214a6a73e7be2eb0a4080a280f3c369fba19c87a5f5fa7f9539a5f2e96d97697763cf4414dc580a6537e3
@@ -18,7 +18,7 @@ module Brasil
18
18
  EstadoMapper::ESTADOS.values.map { |estado| estado[:nome] }
19
19
  end
20
20
 
21
- def self.by_regiao(regiao, info_requested = nil)
21
+ def self.by_regiao(regiao)
22
22
  estados = []
23
23
  EstadoMapper::ESTADOS.each_pair do |sigla, estado|
24
24
  if estado[:regiao] == sanitize(regiao)
@@ -27,15 +27,7 @@ module Brasil
27
27
  end
28
28
 
29
29
  raise ArgumentError, "Not a valid regiao" if estados.empty?
30
- raise ArgumentError, "Invalid information requested" if !valid_info?(info_requested)
31
-
32
- return estados unless info_requested
33
-
34
- if !estados.empty? && valid_info?(info_requested)
35
- return estados.map do |estado|
36
- estado.public_send(info_requested)
37
- end
38
- end
30
+ estados
39
31
  end
40
32
 
41
33
  # English aliases
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brasil-estados
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Fleury
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-09 00:00:00.000000000 Z
11
+ date: 2016-05-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Brasil Estados is a Ruby Gem for accessing information about states from
14
14
  Brazil