Module: Vita::Format

Defined in:
lib/vita/format.rb,
lib/vita/format/org.rb,
lib/vita/format/markdown.rb

Defined Under Namespace

Classes: Markdown, Org

Class Method Summary collapse

Class Method Details

.for_filename(filename) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/vita/format.rb', line 6

def self.for_filename(filename)
  case File.extname(filename.downcase)
  when ".org"
    Format::Org.instance
  else
    Format::Markdown.instance
  end
end