mirror of
https://github.com/dkam/paapi.git
synced 2025-12-28 15:14:52 +00:00
Rename the attribute holding the raw json to 'json'.
This commit is contained in:
@@ -2,9 +2,9 @@ require 'nameable'
|
|||||||
|
|
||||||
module Paapi
|
module Paapi
|
||||||
class Item
|
class Item
|
||||||
attr_accessor :raw
|
attr_accessor :json
|
||||||
def initialize(data)
|
def initialize(data)
|
||||||
@raw = data
|
@json = data
|
||||||
end
|
end
|
||||||
|
|
||||||
def asin
|
def asin
|
||||||
@@ -102,7 +102,7 @@ module Paapi
|
|||||||
end
|
end
|
||||||
|
|
||||||
def get(keys)
|
def get(keys)
|
||||||
@raw.dig(*keys)
|
@json.dig(*keys)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.to_items(data)
|
def self.to_items(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user