Module: Diamante

Defined in:
lib/diamante.rb,
lib/diamante/game.rb,
lib/diamante/config.rb,
lib/diamante/version.rb,
lib/diamante/md/parser.rb,
lib/diamante/scenes/ui.rb,
lib/diamante/md/markdown.rb,
lib/diamante/scenes/matrix.rb,
lib/diamante/scenes/slides.rb

Defined Under Namespace

Modules: Scene Classes: Config, Game, Markdown, Parser

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.show(filepath) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/diamante.rb', line 8

def self.show(filepath)
  if filepath.end_with? ".md"
    Markdown.new(filepath).show
  elsif filepath.end_with? ".yaml"
    require_relative "diamante/game"
    Game.new(filepath).game_loop
  else
    warn "[ERROR] Unknown type! (#{filepath})"
    exit 1
  end
end