Class: Trifle::Docs::Harvester::Markdown::Sieve
- Inherits:
-
Sieve
- Object
- Sieve
- Trifle::Docs::Harvester::Markdown::Sieve
show all
- Defined in:
- lib/trifle/docs/harvester/markdown.rb
Instance Attribute Summary
Attributes inherited from Sieve
#file, #path
Instance Method Summary
collapse
Methods inherited from Sieve
#initialize
Instance Method Details
#match? ⇒ Boolean
17
18
19
|
# File 'lib/trifle/docs/harvester/markdown.rb', line 17
def match?
file.end_with?('.md')
end
|
#to_url ⇒ Object
21
22
23
24
25
|
# File 'lib/trifle/docs/harvester/markdown.rb', line 21
def to_url
file.gsub(%r{^#{path}/}, '')
.gsub(%r{/?index\.md}, '')
.gsub(/\.md/, '')
end
|