costagent 0.2.2 → 0.2.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.
Files changed (2) hide show
  1. data/lib/costagent.rb +4 -3
  2. 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 = 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] || @data[key.to_sym]
23
+ @data[key]
23
24
  end
24
25
 
25
26
  def id
26
- @data["id"] || @data[:id]
27
+ @data["id"]
27
28
  end
28
29
  end
29
30
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Elliott Draper