picky 4.21.1 → 4.21.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: 6c8689ff998ff025e835e1a5e6661ce766d51246
4
- data.tar.gz: ae0fe1a7cfbd7bbf511fd049249d462bb683d955
3
+ metadata.gz: 867ccbdac334b762659c0cb099da2545e2ca408f
4
+ data.tar.gz: 0102830fb69655ebe0e097ad84aff897e9e26068
5
5
  SHA512:
6
- metadata.gz: 602df847adb8be592eb798b261d41a22a530b09e8ea8a3b081a438b2153efef6320293a931e705a064e63b88a8b198fae891754999cd24da90d3923728cb2dbf
7
- data.tar.gz: 1a98cf615c82128a6a107d4ec38ed747d5fc5a251318e167136cce36fb625ca814bacad6e15f60515e5e78781493378fd3dc53d5dff9e2e830829234b0f1c65d
6
+ metadata.gz: 3b5efada92088f0e30442f8eb1b9a51dfa551308a9f423e11fa57a326ed22ebff62d36a8fd7ca96257b1474cb1268a9daac2ad7f6f61cfa66277cd0e0740b093
7
+ data.tar.gz: 2dd2598eecd67120079d2feacda2430ded9ab7c0aeee6c8b239b9c3d19ffdc65fe036a194e8abdd13b3527020cf77fef9d7d35273381f89f9882e3834ab5ac0c
@@ -96,7 +96,8 @@ module Picky
96
96
  # === Parameters
97
97
  # * name: Method name of the ID.
98
98
  #
99
- def id name = nil
99
+ def id name = nil, options = {}
100
+ key_format options[:format]
100
101
  @id_name = name || @id_name || :id
101
102
  end
102
103
 
@@ -33,8 +33,7 @@ describe "id option" do
33
33
  data = Picky::Index.new :id do
34
34
  source { things }
35
35
 
36
- key_format :to_i
37
- id :number # TODO :format => :to_i
36
+ id :number, format: 'to_i'
38
37
  category :text
39
38
  end
40
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picky
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.21.1
4
+ version: 4.21.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke