Class: RoadForest::Augment::Affordance::Remove
- Inherits:
-
RoadForest::Augment::Augmentation
- Object
- RoadForest::Augment::Augmentation
- RoadForest::Augment::Affordance::Remove
- Includes:
- GrantTokens
- Defined in:
- lib/roadforest/augment/affordance.rb
Instance Method Summary collapse
Methods included from GrantTokens
Methods inherited from RoadForest::Augment::Augmentation
#canonical_uri, #initialize, object_follows, object_precedes, register_for_objects, register_for_subjects, #router, subject_follows, subject_precedes
Constructor Details
This class inherits a constructor from RoadForest::Augment::Augmentation
Instance Method Details
#apply(term) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/roadforest/augment/affordance.rb', line 27 def apply(term) if term.resource.allowed_methods.include?("DELETE") node = ::RDF::Node.new yield [node, ::RDF.type, Af.Remove] yield [node, Af.target, term.uri] each_grant_token("DELETE", term) do |token| yield [node, Af., token] end end end |