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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ed1b58bbfb635697af8872129c28e894fc80c53096f696f549fc6b91322c355
4
- data.tar.gz: e0ee1d34fddef81702879cad85de840c0de8ff5493cfc39cff8f6657bb3956d8
3
+ metadata.gz: 8c9868ef896a3230d16272498ea7d1774cc7d51e5a44b23554c6750351dc4b10
4
+ data.tar.gz: f8034de7e9869466ca7e6f599d7b57b7f0b0e8fd7dc223488471922b3e6c39d7
5
5
  SHA512:
6
- metadata.gz: 34bff0ff98233f0fc67e350a4daee7567e468dba4e8e78ac943b7c44263886521c5bafd4fa27dc15f4e7620c60332decca1e66f5df3ccf0d38545c66106c5860
7
- data.tar.gz: 2a682a1b9aebcc838c173daabc7482ec41568cbc57fe7fd8312252cafc1991c476921bccb0e9501dd457cc1bc87034d1718a5429dc45e53870a6d811b1e52e3f
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+ or not a +string+
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
 
@@ -1,5 +1,5 @@
1
1
  module KenticoCloud
2
2
  module Delivery
3
- VERSION = '1.0.6'.freeze
3
+ VERSION = '1.0.7'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delivery-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dugre