Class: Yuzu::PostProcessors::PostProcessor
- Inherits:
-
Register
- Object
- Register
- Yuzu::PostProcessors::PostProcessor
show all
- Defined in:
- lib/yuzu/postprocessors/base.rb
Constant Summary
collapse
- @@postprocessors =
{}
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of PostProcessor.
16
17
18
|
# File 'lib/yuzu/postprocessors/base.rb', line 16
def initialize
@name = :postprocessor
end
|
Instance Attribute Details
Returns the value of attribute name.
14
15
16
|
# File 'lib/yuzu/postprocessors/base.rb', line 14
def name
@name
end
|
Class Method Details
.postprocessors ⇒ Object
10
11
12
|
# File 'lib/yuzu/postprocessors/base.rb', line 10
def self.postprocessors
@@postprocessors
end
|
7
8
9
|
# File 'lib/yuzu/postprocessors/base.rb', line 7
def self.registry
:postprocessors
end
|
Instance Method Details
#match(contents) ⇒ Object
24
25
26
|
# File 'lib/yuzu/postprocessors/base.rb', line 24
def match(contents)
contents.to_s.match(regex)
end
|
28
29
30
|
# File 'lib/yuzu/postprocessors/base.rb', line 28
def regex
/.*/
end
|
#value(website_file) ⇒ Object
20
21
22
|
# File 'lib/yuzu/postprocessors/base.rb', line 20
def value(website_file)
match(website_file.rendered_contents)
end
|