costagent 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/costagent.rb +4 -3
- metadata +2 -2
data/lib/costagent.rb
CHANGED
@@ -11,7 +11,8 @@ class CostAgent
|
|
11
11
|
attr_accessor :data
|
12
12
|
|
13
13
|
def initialize(data = {})
|
14
|
-
@data =
|
14
|
+
@data = {}
|
15
|
+
data.keys.each { |key| @data[key.to_s] = data[key] }
|
15
16
|
end
|
16
17
|
|
17
18
|
def method_missing(name, *args)
|
@@ -19,11 +20,11 @@ class CostAgent
|
|
19
20
|
if key[key.length - 1] == "="
|
20
21
|
@data[key[0...key.length - 1]] = args.first
|
21
22
|
end
|
22
|
-
@data[key]
|
23
|
+
@data[key]
|
23
24
|
end
|
24
25
|
|
25
26
|
def id
|
26
|
-
@data["id"]
|
27
|
+
@data["id"]
|
27
28
|
end
|
28
29
|
end
|
29
30
|
|