mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[simpledb] simplify array defaulting in parsers
This commit is contained in:
parent
fa29473bbb
commit
f57d13bfd1
2 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ module Fog
|
|||
response[name] = @value.to_f
|
||||
when 'Name'
|
||||
@attribute = @value
|
||||
response['Attributes'][@attribute] = [] unless response['Attributes'][@attribute].is_a?(Array)
|
||||
response['Attributes'][@attribute] ||= []
|
||||
when 'RequestId'
|
||||
response[name] = @value
|
||||
when 'Value'
|
||||
|
|
|
@ -24,7 +24,7 @@ module Fog
|
|||
response['Items'][@item_name] = {}
|
||||
else
|
||||
@attribute_name = @value
|
||||
response['Items'][@item_name][@attribute_name] = [] unless response['Items'][@item_name][@attribute_name].is_a?(Array)
|
||||
response['Items'][@item_name][@attribute_name] ||= []
|
||||
end
|
||||
when 'NextToken', 'RequestId'
|
||||
response[name] = @value
|
||||
|
|
Loading…
Add table
Reference in a new issue