dbc-ruby 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@ module DBC
3
3
  def initialize(attributes)
4
4
  attributes.each do |key, value|
5
5
  instance_variable_set("@#{key}", value)
6
+ self.class.send(:define_method, key){ value }
6
7
  end
7
8
  end
8
9
 
@@ -23,14 +24,13 @@ module DBC
23
24
  private
24
25
 
25
26
  def self.create_dbc_objects(api_response)
26
- api_response.values.first.map! do |object|
27
+ api_response.values.first.map do |object|
27
28
  self.new(object)
28
29
  end
29
- api_response
30
30
  end
31
31
 
32
32
  def self.create_dbc_object(api_response)
33
- { api_response.keys.first => self.new(api_response.values.first) }
33
+ self.new(api_response.values.first)
34
34
  end
35
35
  end
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module DBC
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbc-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: