iugu 1.0.7 → 1.0.8
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.
- checksums.yaml +8 -8
- data/lib/iugu/object.rb +8 -5
- data/lib/iugu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGFjNGUzNGZjYTVkMTVhOWJkNWM2MTc0NzQ4OTUyOTE2MTc0NDQ2Zg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTY1NDhmYTdlYTg0ZDY5ZDBhMzBhZDc5ZTJiY2FhOTk1MDc3NDZjNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzY3NjEzMTQwNTNhNWJjZTljYTZjNzZhNDY3YmJiMWFjODRjZjQwNmEwOWE0
|
10
|
+
MDQxZDc5N2U2ODkxYWRlMTU0MzMyZmY2YjU0NDI5YjJmNWJiM2RhZDBlOGQ1
|
11
|
+
OWY0YTdhY2RhYzI0ZDE0MWJmNzk3ZjEyODliNjYyODcwM2IyOWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTQxNThjNzljNWVjNWE0OWU3MWU3ZWE2YjNhMWE5NWZkNmUwYjI5MDI3ODli
|
14
|
+
OGZjNmM3MWE0OTE5Nzc1NzIyNDNkOWJlMWRiNjkzYTNjZDZjM2YxMjNiZjQy
|
15
|
+
MmE0NjIzMmMxY2MzN2QyYWI1MTNhYmNlOWNmMDI5Zjc0ZTAwZDM=
|
data/lib/iugu/object.rb
CHANGED
@@ -13,14 +13,13 @@ module Iugu
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def add_accessor(name)
|
16
|
-
|
17
|
-
define_method(name.to_s) {
|
16
|
+
singleton_class.class_eval do
|
17
|
+
define_method(name.to_s) { self.attributes[name.to_s] }
|
18
18
|
define_method(name.to_s + "=") do |value|
|
19
|
-
|
20
|
-
|
19
|
+
self.attributes[name.to_s] = value
|
20
|
+
self.unsaved_attributes.add name.to_s
|
21
21
|
end unless name.to_s == 'id'
|
22
22
|
end
|
23
|
-
self.class.__send__ :attr_accessor, name.to_sym
|
24
23
|
end
|
25
24
|
|
26
25
|
def method_missing(name, *args)
|
@@ -30,6 +29,10 @@ module Iugu
|
|
30
29
|
return send(name, args[0])
|
31
30
|
end
|
32
31
|
|
32
|
+
def unsaved_attributes
|
33
|
+
@unsaved_attributes
|
34
|
+
end
|
35
|
+
|
33
36
|
def attributes
|
34
37
|
@attributes
|
35
38
|
end
|
data/lib/iugu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iugu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Paez Sequeira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|