Class: Ldpath::PropertySelector

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) ⇒ PropertySelector

Returns a new instance of PropertySelector.



88
89
90
91
92
# File 'lib/ldpath/selectors.rb', line 88

def initialize(property)
  @property = property

  super
end

Instance Attribute Details

#propertyObject (readonly)

Returns the value of attribute property.



86
87
88
# File 'lib/ldpath/selectors.rb', line 86

def property
  @property
end

Instance Method Details

#evaluate_one(uri, context) ⇒ Object



94
95
96
# File 'lib/ldpath/selectors.rb', line 94

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