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, LoosePropertySelector, NegatedPropertySelector, NotTest, OrTest, Parser, PathSelector, Program, PropertySelector, RecursivePathSelector, Result, ReversePropertySelector, Selector, SelfSelector, TapSelector, TestSelector, Transform, TypeTest, UnionSelector, WildcardSelector

Constant Summary collapse

VERSION =
'1.0.1'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.loggerObject



22
23
24
25
26
27
28
29
30
# File 'lib/ldpath.rb', line 22

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

Class Method Details

.evaluate(program, uri, context) ⇒ Object



18
19
20
# File 'lib/ldpath.rb', line 18

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