subroutine 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 +4 -4
- data/lib/subroutine/type_caster.rb +1 -1
- data/lib/subroutine/version.rb +1 -1
- data/test/support/ops.rb +0 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69a45cc817b2842dbfde8c90bab1a4f0e51aa176
|
4
|
+
data.tar.gz: 93b0c98b884e4dbfba07b3b0f02e8a832976dc2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79575f449048ce2662aeb5cb2eb15a15a553aefff9b840ea49e563efee213af86463dc0b4f39ec994e4f27e845f6208ea7940385c43d1853471d750432f78787
|
7
|
+
data.tar.gz: 1f6924189af0dddbec8647bcdc3bf9e7490d633503e8b154ca584965601ea8db5e19ea05e38c30bf439485e05f8b69641b621c8c2f26738dc810b4f4e73f695f
|
@@ -31,7 +31,7 @@ module Subroutine
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
Subroutine::TypeCaster.register :number do |value, *meths|
|
34
|
+
Subroutine::TypeCaster.register :number, :float do |value, *meths|
|
35
35
|
next nil if value.blank?
|
36
36
|
meth = meths.detect{|m| value.respond_to?(m) }
|
37
37
|
meth ? value.send(meth) : value.to_f
|
data/lib/subroutine/version.rb
CHANGED
data/test/support/ops.rb
CHANGED
@@ -101,13 +101,10 @@ class OnlyFooBarOp < ::Subroutine::Op
|
|
101
101
|
end
|
102
102
|
|
103
103
|
class InheritedDefaultsOp < ::DefaultsOp
|
104
|
-
|
105
104
|
field :bar, :default => 'barstool'
|
106
|
-
|
107
105
|
end
|
108
106
|
|
109
107
|
class TypeCastOp < ::Subroutine::Op
|
110
|
-
|
111
108
|
integer :integer_input
|
112
109
|
number :number_input
|
113
110
|
decimal :decimal_input
|