attrio 0.6.0 → 0.6.1

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: 861576afb99f94868a01b939116bfba6d6276306
4
- data.tar.gz: 6a111a94772edb9199b59b095002dfac0f03d88d
3
+ metadata.gz: 82e6aa7dc69c239169c91a04fc181cc98122d07d
4
+ data.tar.gz: 5e82a61c7f4c9eadf0a410beb5f69df2c91739c4
5
5
  SHA512:
6
- metadata.gz: b064f63381b115945464627375774ae37267d965997474af9512eb704d5ba6c4a3028bea7abcce388564f3eb689a08d92e531eb24d0157bd436f7f053010f93a
7
- data.tar.gz: 7f907cc9f4db1869b55c8e7d7c1b957d3ef63377905f63f33d9ac99bfc7773dbea8e6a683e67a02f8f0595c73cba8d40acce26bfe71724151088e09a7a5129ca
6
+ metadata.gz: 62ed6efe9a4c52eb897e0327fd38af6f737f447607348faf4cee5a38a454f0e0fd58b23f5104b279d37f1935701d09d0026045c48573351f0d89e4044bf17d4f
7
+ data.tar.gz: f0d3dfade7af51b4c0094f3f3fca5eb5d5d6f4b1b97ee14f8c44a6ed683e2f209b14cfb16324d60b554540e29dee889b9560b7581f560011d5b0377694c77f3f
@@ -13,7 +13,7 @@ module Attrio
13
13
 
14
14
  array.map! do |item|
15
15
  if type.respond_to?(:typecast) && type.respond_to?(:typecasted?)
16
- type.typecasted?(item) ? item : type.typecast(*[item, options])
16
+ type.typecasted?(item) ? item : type.typecast(item, options)
17
17
  else
18
18
  type == Hash && item.is_a?(Hash) ? value : type.new(item)
19
19
  end
@@ -39,7 +39,7 @@ module Attrio
39
39
  end
40
40
 
41
41
  def self.element_options(element)
42
- element[:options]
42
+ element[:options] || {}
43
43
  rescue
44
44
  {}
45
45
  end
@@ -5,7 +5,7 @@ module Attrio
5
5
  class Integer < Base
6
6
  def self.typecast(value, options = {})
7
7
  options[:base] ||= 10
8
-
8
+
9
9
  begin
10
10
  return value.to_i(options[:base]) if value.is_a?(String)
11
11
  return value.to_i
@@ -4,7 +4,7 @@ module Attrio
4
4
  module Version
5
5
  MAJOR = 0
6
6
  MINOR = 6
7
- PATCH = 0
7
+ PATCH = 1
8
8
  BUILD = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attrio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Alexandrov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-26 00:00:00.000000000 Z
12
+ date: 2013-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec