costagent 0.1.2 → 0.1.3
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/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
|