Class: Ldpath::ReversePropertySelector

Inherits:
Selector
  • Object
show all
Defined in:
lib/ldpath/selectors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Selector

#evaluate, #loading

Constructor Details

#initialize(property) ⇒ ReversePropertySelector

Returns a new instance of ReversePropertySelector.



79
80
81
# File 'lib/ldpath/selectors.rb', line 79

def initialize(property)
  @property = property
end

Instance Attribute Details

#propertyObject (readonly)

Returns the value of attribute property.



78
79
80
# File 'lib/ldpath/selectors.rb', line 78

def property
  @property
end

Instance Method Details

#evaluate_one(uri, context) ⇒ Object



83
84
85
# File 'lib/ldpath/selectors.rb', line 83

def evaluate_one(uri, context)
  context.query([nil, property, uri]).map(&:subject)
end