Method: MemoRack::Core#content_name

Defined in:
lib/memorack/core.rb

#content_name(path) ⇒ Object

パスからコンテント名を取得する



653
654
655
656
657
658
659
660
661
# File 'lib/memorack/core.rb', line 653

def content_name(path)
	plugin = PageInfo[path]

	if plugin
		plugin.new(File.expand_path(path, @root))[:title]
	else
		File.basename(path, '.*')
	end
end