epitools 0.5.26 → 0.5.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/epitools/typed_struct.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a8f9d87acab709f5958ae1fdbc12019292c78b35
|
|
4
|
+
data.tar.gz: a8c623bca7e314fca88fe5c9d7eeedbf22622548
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e81762bb644caecf7935b1b2148c8f4cc5ee17e4efa0ddb929f3bad8322440f90ae775b7902e15fa9b992ea5e0cd4b2e4fafc392e5b3da19bdc3317b588c04a
|
|
7
|
+
data.tar.gz: 6af8ba75f18991b5049f29087458845cc0e6322d28d615c7040c33ee9207fda288fdad2f44a130f8fd74e535366edb9da91c1c6e5f4f0528488d5ad06de41b4a
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.27
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
#
|
|
16
16
|
# <no type given> => Don't enforce a type -- any ruby object is allowed.
|
|
17
17
|
# ["str", "string"] => String
|
|
18
|
+
# ["sym", "symbol"] => Symbol
|
|
18
19
|
# ["int", "integer"] => Integer
|
|
19
20
|
# ["float"] => Float
|
|
20
21
|
# ["bigdecimal"] => BigDecimal
|
|
@@ -40,6 +41,7 @@ class TypedStruct < Struct
|
|
|
40
41
|
CONVERTERS = Hash[ *{
|
|
41
42
|
[:passthru] => :passthru,
|
|
42
43
|
["str", "string"] => proc { |me| me.to_s },
|
|
44
|
+
["sym", "symbol"] => proc { |me| me.to_sym },
|
|
43
45
|
["int", "integer"] => proc { |me| me.to_i },
|
|
44
46
|
["float"] => proc { |me| me.to_f },
|
|
45
47
|
["bigdecimal"] => proc { |me| BigDecimal.new me },
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: epitools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.27
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- epitron
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-06-
|
|
11
|
+
date: 2013-06-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|