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.



142
143
144
145
146
# File 'lib/ldpath/selectors.rb', line 142

def initialize(property)
  @property = property

  super
end

Instance Attribute Details

#propertyObject (readonly)

Returns the value of attribute property.



140
141
142
# File 'lib/ldpath/selectors.rb', line 140

def property
  @property
end

Instance Method Details

#evaluate_one(uri, context) ⇒ Object



148
149
150
# File 'lib/ldpath/selectors.rb', line 148

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