Class: JsonRefs::DereferenceHandler::Local

Inherits:
Object
  • Object
show all
Defined in:
lib/json_refs/dereference_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Local

Returns a new instance of Local.



17
18
19
20
# File 'lib/json_refs/dereference_handler.rb', line 17

def initialize(options = {})
  @path = options.fetch(:path)
  @doc = options.fetch(:doc)
end

Instance Method Details

#callObject



22
23
24
# File 'lib/json_refs/dereference_handler.rb', line 22

def call
  Hana::Pointer.new(@path[1..-1]).eval(@doc)
end