mirror of
https://github.com/dkam/paapi.git
synced 2025-12-28 15:14:52 +00:00
Delegate dig to the hash which defines the item
This commit is contained in:
@@ -1,8 +1,13 @@
|
|||||||
require 'nameable'
|
require 'nameable'
|
||||||
|
require 'forwardable'
|
||||||
|
|
||||||
module Paapi
|
module Paapi
|
||||||
class Item
|
class Item
|
||||||
|
extend Forwardable
|
||||||
attr_accessor :hash
|
attr_accessor :hash
|
||||||
|
|
||||||
|
def_delegators :@hash, :dig
|
||||||
|
|
||||||
def initialize(data)
|
def initialize(data)
|
||||||
@hash = data
|
@hash = data
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user