class Lurker::RefObject
Public Class Methods
new(ref_path, root_path)
click to toggle source
# File lib/lurker/ref_object.rb, line 2 def initialize(ref_path, root_path) @ref_path = ref_path @root_path = root_path end
Public Instance Methods
abs_path()
click to toggle source
# File lib/lurker/ref_object.rb, line 19 def abs_path @abs_path ||= @root_path.merge(URI.parse(@ref_path)).tap { |u| u.fragment = nil } end
schema()
click to toggle source
# File lib/lurker/ref_object.rb, line 7 def schema return @ref_schema if @ref_schema return {} if @ref_path.nil? || @root_path.nil? @ref_schema = JSON.parse(schema_descriptor.read) end
schema_descriptor()
click to toggle source
# File lib/lurker/ref_object.rb, line 13 def schema_descriptor open(abs_path.to_s) rescue Errno::ENOENT Lurker::JamlDescriptor.new(abs_path.to_s) end