Class: RhetButler::Stasis::DocumentTransform
- Inherits:
-
Object
- Object
- RhetButler::Stasis::DocumentTransform
show all
- Defined in:
- lib/rhet-butler/stasis/document-transform.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#document ⇒ Object
Returns the value of attribute document.
9
10
11
|
# File 'lib/rhet-butler/stasis/document-transform.rb', line 9
def document
@document
end
|
#queue ⇒ Object
Returns the value of attribute queue.
9
10
11
|
# File 'lib/rhet-butler/stasis/document-transform.rb', line 9
def queue
@queue
end
|
#target_path ⇒ Object
Returns the value of attribute target_path.
9
10
11
|
# File 'lib/rhet-butler/stasis/document-transform.rb', line 9
def target_path
@target_path
end
|
Class Method Details
.register(type) ⇒ Object
5
6
7
|
# File 'lib/rhet-butler/stasis/document-transform.rb', line 5
def self.register(type)
TransformQueue.register(type, self)
end
|
Instance Method Details
#document_source ⇒ Object
11
12
13
|
# File 'lib/rhet-butler/stasis/document-transform.rb', line 11
def document_source
@document.source_uri
end
|
#get_link_translation(link) ⇒ Object
27
28
29
|
# File 'lib/rhet-butler/stasis/document-transform.rb', line 27
def get_link_translation(link)
queue.target_for(document, document_source).route_to(queue.target_for(document, link))
end
|
#process ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/rhet-butler/stasis/document-transform.rb', line 19
def process
parse_document
translate_links
save_document
end
|
#save_document ⇒ Object
15
16
17
|
# File 'lib/rhet-butler/stasis/document-transform.rb', line 15
def save_document
@queue.write_document(target_path, render_document)
end
|