Dex_Rack 0.1.3 → 0.1.4
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/Dex_Rack.rb +7 -2
- data/lib/Dex_Rack/version.rb +1 -1
- metadata +1 -1
data/lib/Dex_Rack.rb
CHANGED
@@ -33,8 +33,9 @@ class Dex_Rack
|
|
33
33
|
recent page
|
34
34
|
end
|
35
35
|
|
36
|
-
get
|
37
|
-
r =
|
36
|
+
get '/:id' do | id |
|
37
|
+
r = find_id( id )
|
38
|
+
pass unless r
|
38
39
|
|
39
40
|
if r
|
40
41
|
vars= Hash[
|
@@ -94,6 +95,10 @@ class Dex_Rack
|
|
94
95
|
@count ||= dex.count
|
95
96
|
end
|
96
97
|
|
98
|
+
def find_id id
|
99
|
+
r = dex.filter(:id=>id).first
|
100
|
+
end
|
101
|
+
|
97
102
|
def list_recent limit, offset
|
98
103
|
dex.limit(limit, offset).to_a.reverse
|
99
104
|
end
|
data/lib/Dex_Rack/version.rb
CHANGED