husky 0.4.2 → 0.4.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.
- checksums.yaml +4 -4
- data/lib/husky/entity.rb +16 -0
- data/lib/husky/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b738b15ab8dbfa882449c7e837b8da70d3254c79
|
4
|
+
data.tar.gz: 9d86b6bf4b8bccf5ce1bf91617493bbbe6e049ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d8b1ef8328e0a7b09188a8719af86423276226d388a82978d5578b4d8c7923cb7537b592a2529db06c48ff79fa86fbd554a4b73f3d4cccd5b9de59fbc2b0d3d
|
7
|
+
data.tar.gz: 311068252654225cb79f12e9866c21bb61e828bab6bd9b543512989513bcd1e8a5ba626cf38a3fbf771409dbc81251a476a2505b34de673d09ff958cebe4df26
|
data/lib/husky/entity.rb
CHANGED
@@ -44,6 +44,22 @@ module Husky
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
def set_basic_attributes_from_hash(hash)
|
48
|
+
post_data.each_pair do |key, value|
|
49
|
+
unless value.respond_to? :each
|
50
|
+
instance_variable_set("@#{key}", value)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
post_data.each_pair do |key, value|
|
55
|
+
unless value.respond_to? :each
|
56
|
+
self.class.send(:define_method, key) do
|
57
|
+
instance_variable_get("@#{key}")
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
47
63
|
end
|
48
64
|
|
49
65
|
end
|
data/lib/husky/version.rb
CHANGED