lolitra 0.1.0 → 0.1.1

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.
@@ -199,18 +199,13 @@ module Lolitra
199
199
  base.send :extend, MessageClass
200
200
  end
201
201
 
202
- def initialize(hash={})
203
- hash.each { |key, value| self.send("#{MessageHandler::Helpers.underscore(key)}=", value) }
204
- end
205
-
206
- def to_hash
207
- hash = {}
208
- self.instance_variables.each {|var| hash[var.to_s.delete("@").to_sym] = self.instance_variable_get(var) }
209
- hash
202
+ def initialize(hash={})
203
+ super()
204
+ self.replace(hash)
210
205
  end
211
206
 
212
207
  def marshall
213
- JSON.generate(to_hash)
208
+ JSON.generate(self)
214
209
  end
215
210
  end
216
211
 
@@ -1,3 +1,3 @@
1
1
  module Lolitra
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Hugo Freire
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-12-08 00:00:00 -05:00
17
+ date: 2012-12-23 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency