Class: RoadForest::Augment::Augmentation

Inherits:
Object
  • Object
show all
Defined in:
lib/roadforest/augment/augmentation.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(augmenter) ⇒ Augmentation

Returns a new instance of Augmentation.



31
32
33
# File 'lib/roadforest/augment/augmentation.rb', line 31

def initialize(augmenter)
  @augmenter = augmenter
end

Class Method Details

.object_follows(other) ⇒ Object



26
27
28
# File 'lib/roadforest/augment/augmentation.rb', line 26

def object_follows(other)
  Augmenter.object_augmentations_registry.seq(other, self.name)
end

.object_precedes(other) ⇒ Object



22
23
24
# File 'lib/roadforest/augment/augmentation.rb', line 22

def object_precedes(other)
  Augmenter.object_augmentations_registry.seq(self.name, other)
end

.register_for_objectsObject



18
19
20
# File 'lib/roadforest/augment/augmentation.rb', line 18

def register_for_objects
  Augmenter.object_augmentations_registry.add(self.name, self)
end

.register_for_subjectsObject



6
7
8
# File 'lib/roadforest/augment/augmentation.rb', line 6

def register_for_subjects
  Augmenter.subject_augmentations_registry.add(self.name, self)
end

.subject_follows(other) ⇒ Object



14
15
16
# File 'lib/roadforest/augment/augmentation.rb', line 14

def subject_follows(other)
  Augmenter.subject_augmentations_registry.seq(other, self.name)
end

.subject_precedes(other) ⇒ Object



10
11
12
# File 'lib/roadforest/augment/augmentation.rb', line 10

def subject_precedes(other)
  Augmenter.subject_augmentations_registry.seq(self.name, other)
end

Instance Method Details

#canonical_uriObject



35
36
37
# File 'lib/roadforest/augment/augmentation.rb', line 35

def canonical_uri
  @augmenter.canonical_uri
end

#routerObject



39
40
41
# File 'lib/roadforest/augment/augmentation.rb', line 39

def router
  @augmenter.router
end