Module: Ldpath

Defined in:
lib/ldpath/functions.rb,
lib/ldpath.rb,
lib/ldpath/tests.rb,
lib/ldpath/parser.rb,
lib/ldpath/result.rb,
lib/ldpath/loaders.rb,
lib/ldpath/program.rb,
lib/ldpath/version.rb,
lib/ldpath/selectors.rb,
lib/ldpath/transform.rb,
lib/ldpath/field_mapping.rb,
lib/ldpath/loaders/graph.rb,
lib/ldpath/loaders/direct.rb,
lib/ldpath/loaders/linked_data_fragment.rb

Overview

rubocop:disable Style/MethodName

Defined Under Namespace

Modules: Functions, Loaders Classes: AndTest, CompoundSelector, FieldMapping, FunctionSelector, IntersectionSelector, IsTest, LanguageTest, LoosePropertySelector, NegatedPropertySelector, NotTest, OrTest, Parser, PathSelector, Program, PropertySelector, RecursivePathSelector, Result, ReversePropertySelector, Selector, SelfSelector, TapSelector, TestSelector, Transform, TypeTest, UnionSelector, WildcardSelector

Constant Summary collapse

VERSION =
'1.2.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.loggerObject



31
32
33
34
35
36
37
# File 'lib/ldpath.rb', line 31

def logger
  @logger ||= if defined? Rails
                Rails.logger
              else
                Logger.new($stderr)
              end
end

Class Method Details

.evaluate(program, uri, context) ⇒ Object



27
28
29
# File 'lib/ldpath.rb', line 27

def evaluate(program, uri, context)
  Ldpath::Program.parse(program).evaluate(uri, context)
end