class Madness::Item
Attributes
Public Class Methods
Source
# File lib/madness/item.rb, line 8 def initialize(path, type) @path = path @type = type end
Public Instance Methods
Source
# File lib/madness/item.rb, line 17 def href @href ||= begin result = path_without_extension.sub(/^#{docroot}/, '').to_href "#{config.base_uri}#{result}" end end
Private Instance Methods
Source
# File lib/madness/item.rb, line 34 def label! File.basename(path_without_extension).to_label end
Source
# File lib/madness/item.rb, line 38 def path_without_extension @path_without_extension ||= path.sub(/\.md$/, '') end