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.



47
48
49
# File 'lib/ldpath/selectors.rb', line 47

def initialize(property)
  @property = property
end

Instance Attribute Details

#propertyObject (readonly)

Returns the value of attribute property.



46
47
48
# File 'lib/ldpath/selectors.rb', line 46

def property
  @property
end

Instance Method Details

#evaluate_one(uri, context) ⇒ Object



51
52
53
# File 'lib/ldpath/selectors.rb', line 51

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