tolerate empty string result from Fiken API
This commit is contained in:
+2
-1
@@ -12,7 +12,8 @@ module Fiken
|
||||
class Object
|
||||
def initialize(attributes = {})
|
||||
@attributes = {}
|
||||
(attributes || {}).each { |key, value| @attributes[key.to_sym] = wrap(value) }
|
||||
attributes = {} unless attributes.is_a?(Hash)
|
||||
attributes.each { |key, value| @attributes[key.to_sym] = wrap(value) }
|
||||
end
|
||||
|
||||
def [](key)
|
||||
|
||||
Reference in New Issue
Block a user