class Wst::MdContent
Public Class Methods
matcher()
click to toggle source
# File lib/wst/md_content.rb, line 31 def self.matcher @@matcher end
new(file_path)
click to toggle source
Calls superclass method
Wst::Content::new
# File lib/wst/md_content.rb, line 9 def initialize file_path super file_path m, cats, date, slug, ext = *file_path.match(@@matcher) @cats = cats @date = Time.parse(date) if date @slug = slug @ext = ext end
Public Instance Methods
date()
click to toggle source
# File lib/wst/md_content.rb, line 19 def date @date end
raw_content()
click to toggle source
# File lib/wst/md_content.rb, line 23 def raw_content if useDefaultLinks? content_with_links else @plain_content end end
Protected Instance Methods
content_with_links()
click to toggle source
# File lib/wst/md_content.rb, line 37 def content_with_links @plain_content + defaultLinks end
useDefaultLinks?()
click to toggle source
# File lib/wst/md_content.rb, line 41 def useDefaultLinks? if @datas.has_key? 'nolinks' @datas['nolinks'] == 'true' else true end end