kelredd-resourceful 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,12 @@ module Resourceful
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
unless "".respond_to?(:from_currency_to_f)
|
32
|
+
def from_currency_to_f
|
33
|
+
self.gsub(/[^0-9.-]/,'').to_f
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
31
37
|
unless "".respond_to?(:constantize)
|
32
38
|
if Module.method(:const_get).arity == 1
|
33
39
|
def constantize #:nodoc:
|
@@ -9,10 +9,12 @@ module Resourceful
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.get(path, opts={})
|
12
|
-
|
12
|
+
get_proc = opts.delete(:get_proc)
|
13
|
+
set_agent.get(path, opts, &get_proc)
|
13
14
|
end
|
14
15
|
def self.get_collection(path, opts={})
|
15
|
-
|
16
|
+
get_proc = opts.delete(:get_proc)
|
17
|
+
(yield set_agent.get(path, opts, &get_proc)).collect{|data| new(data)}
|
16
18
|
end
|
17
19
|
|
18
20
|
def initialize(data)
|
data/lib/resourceful/version.rb
CHANGED