zendesk 0.1.5 → 0.1.6
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.
- data/lib/zendesk/lib/properties.rb +3 -2
- data/lib/zendesk/ticket.rb +3 -1
- data/lib/zendesk/version.rb +1 -1
- metadata +3 -3
@@ -34,12 +34,11 @@ module Zendesk::Properties
|
|
34
34
|
|
35
35
|
def datetimes(*vars)
|
36
36
|
protected_attributes *vars
|
37
|
-
|
38
37
|
vars.each do |mn|
|
39
38
|
method_name = mn.to_s
|
40
39
|
class_eval <<-END
|
41
40
|
def #{method_name}
|
42
|
-
|
41
|
+
@#{method_name}
|
43
42
|
end
|
44
43
|
END
|
45
44
|
end
|
@@ -80,6 +79,8 @@ module Zendesk::Properties
|
|
80
79
|
self.class._protected_attributes
|
81
80
|
end
|
82
81
|
|
82
|
+
protected
|
83
|
+
|
83
84
|
def load_attributes(attrs = {})
|
84
85
|
attributes.each do |attr|
|
85
86
|
if val = (attrs[attr.to_s] || attrs[attr.to_sym])
|
data/lib/zendesk/ticket.rb
CHANGED
@@ -32,7 +32,9 @@ class Zendesk::Ticket < Zendesk::Resource
|
|
32
32
|
def load_comments(data)
|
33
33
|
@comments = []
|
34
34
|
data[:comments].each do |comment|
|
35
|
-
|
35
|
+
z_comment = Zendesk::Comment.new(comment[:comment])
|
36
|
+
z_comment.load_protected_attributes(comment[:comment])
|
37
|
+
@comments << z_comment
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|
data/lib/zendesk/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrey Deryabin
|