costagent 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/costagent.rb +2 -1
- metadata +2 -2
data/lib/costagent.rb
CHANGED
@@ -24,7 +24,8 @@ class CostAgent
|
|
24
24
|
|
25
25
|
# Returns all projects
|
26
26
|
def projects(filter = "active")
|
27
|
-
@projects ||=
|
27
|
+
@projects ||= {}
|
28
|
+
@projects[filter] ||= (self.api("projects", {:view => filter})/"project").collect { |project| Project.new((project/"id").text.to_i, (project/"name").text, (project/"currency").text, (project/"normal-billing-rate").text.to_f) }
|
28
29
|
end
|
29
30
|
|
30
31
|
# This returns the specified project
|