mirror of
https://github.com/dkam/paapi.git
synced 2025-12-27 22:54:52 +00:00
More safe operator
This commit is contained in:
@@ -128,22 +128,22 @@ module Paapi
|
|||||||
|
|
||||||
def height
|
def height
|
||||||
data = get(%w{ItemInfo ProductInfo ItemDimensions Height})
|
data = get(%w{ItemInfo ProductInfo ItemDimensions Height})
|
||||||
[data&.dig('DisplayValue'), data.dig('Unit')].join(' ')
|
[data&.dig('DisplayValue'), data&.dig('Unit')].join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def length
|
def length
|
||||||
data = get(%w{ItemInfo ProductInfo ItemDimensions Length})
|
data = get(%w{ItemInfo ProductInfo ItemDimensions Length})
|
||||||
[data&.dig('DisplayValue'), data.dig('Unit')].join(' ')
|
[data&.dig('DisplayValue'), data&.dig('Unit')].join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def width
|
def width
|
||||||
data = get(%w{ItemInfo ProductInfo ItemDimensions Width})
|
data = get(%w{ItemInfo ProductInfo ItemDimensions Width})
|
||||||
[data&.dig('DisplayValue'), data.dig('Unit')].join(' ')
|
[data&.dig('DisplayValue'), data&.dig('Unit')].join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def weight
|
def weight
|
||||||
data = get(%w{ItemInfo ProductInfo ItemDimensions Weight})
|
data = get(%w{ItemInfo ProductInfo ItemDimensions Weight})
|
||||||
[data&.dig('DisplayValue'), data.dig('Unit')].join(' ')
|
[data&.dig('DisplayValue'), data&.dig('Unit')].join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def kindle?
|
def kindle?
|
||||||
|
|||||||
Reference in New Issue
Block a user