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.



125
126
127
# File 'lib/ldpath/selectors.rb', line 125

def initialize(property)
  @property = property
end

Instance Attribute Details

#propertyObject (readonly)

Returns the value of attribute property.



124
125
126
# File 'lib/ldpath/selectors.rb', line 124

def property
  @property
end

Instance Method Details

#evaluate_one(uri, context) ⇒ Object



129
130
131
# File 'lib/ldpath/selectors.rb', line 129

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