woefoo 0.0.7 → 0.0.8
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.
- data/lib/woefoo/config.rb +17 -15
- data/lib/woefoo/version.rb +1 -1
- metadata +3 -3
data/lib/woefoo/config.rb
CHANGED
@@ -1,20 +1,22 @@
|
|
1
|
-
module Woefoo
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
module Woefoo
|
2
|
+
module Config
|
3
|
+
# appid is the user's Yahoo app id (http://developer.yahoo.com/geo/placefinder/)
|
4
|
+
attr :appid, true
|
5
|
+
# the number of results to return for each request
|
6
|
+
attr :placefinder_result_count, true
|
7
|
+
# the minimum input quality for a canonical town match
|
8
|
+
attr :min_input_quality, true
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+
def placefinder_result_count
|
11
|
+
(@placefinder_result_count && @placefinder_result_count > 0) ? @placefinder_result_count : 3
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
def min_input_quality
|
15
|
+
(@min_input_quality && @min_input_quality > 0) ? @min_input_quality : 40
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
|
18
|
+
def min_result_quality
|
19
|
+
(@min_result_quality && @min_result_quality > 0) ? @min_result_quality : 80
|
20
|
+
end
|
19
21
|
end
|
20
22
|
end
|
data/lib/woefoo/version.rb
CHANGED
metadata
CHANGED