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/program.rb,
lib/ldpath/version.rb,
lib/ldpath/selectors.rb,
lib/ldpath/transform.rb,
lib/ldpath/field_mapping.rb

Overview

rubocop:disable Style/MethodName

Defined Under Namespace

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

Constant Summary collapse

VERSION =
'1.1.0'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.loggerObject



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

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

Class Method Details

.evaluate(program, uri, context) ⇒ Object



24
25
26
# File 'lib/ldpath.rb', line 24

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