delivery-sdk-ruby 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/delivery/models/content_item.rb +3 -3
- data/lib/delivery/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c9868ef896a3230d16272498ea7d1774cc7d51e5a44b23554c6750351dc4b10
|
4
|
+
data.tar.gz: f8034de7e9869466ca7e6f599d7b57b7f0b0e8fd7dc223488471922b3e6c39d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b6ff202e3bada14b5e6a61aa2c3a0cf9f9b97e39b7387f29f470d2bcbd7e4c724a5db394ef258086d6403ba78b51f669a8b54aa9a5da571045996f61f44b706
|
7
|
+
data.tar.gz: cd17de1e1e045333d77f2f0dac380c7b0551be2a03721fe64bac44e2a192c9e20414fa0a4ce74bdcd0ae70d9aec1176e84f6c0f409f20009fe49954ab2484829
|
@@ -124,17 +124,17 @@ module KenticoCloud
|
|
124
124
|
# Gets the JSON object from the 'elements' collection with the specified key
|
125
125
|
#
|
126
126
|
# * *Args*:
|
127
|
-
# - *code_name* (+string+) The code name of the desired element
|
127
|
+
# - *code_name* (+string+, +symbol+) The code name or symbol of the desired element
|
128
128
|
#
|
129
129
|
# * *Returns*:
|
130
130
|
# - +JSON+ The element as a JSON object
|
131
131
|
#
|
132
132
|
# * *Raises*:
|
133
|
-
# - +ArgumentError+ if +code_name+ is +nil+
|
133
|
+
# - +ArgumentError+ if +code_name+ is +nil+
|
134
134
|
def get_element(code_name)
|
135
135
|
raise ArgumentError, "Argument 'code_name' cannot be null" if code_name.nil?
|
136
|
-
raise ArgumentError, "Argument 'code_name' is not a string" unless code_name.is_a? String
|
137
136
|
|
137
|
+
code_name = code_name.to_s if code_name.is_a? Symbol
|
138
138
|
@source['elements'][code_name]
|
139
139
|
end
|
140
140
|
|
data/lib/delivery/version.rb
CHANGED