Module: Diamante
- Defined in:
- lib/diamante.rb,
lib/diamante/game.rb,
lib/diamante/config.rb,
lib/diamante/project.rb,
lib/diamante/version.rb,
lib/diamante/md/parser.rb,
lib/diamante/scenes/ui.rb,
lib/diamante/md/markdown.rb,
lib/diamante/scenes/base.rb,
lib/diamante/scenes/space.rb,
lib/diamante/scenes/matrix.rb,
lib/diamante/scenes/slides.rb,
lib/diamante/scenes/scene_factory.rb
Defined Under Namespace
Modules: Scene
Classes: Config, Game, Markdown, Parser, Project
Constant Summary
collapse
- VERSION =
"0.3.2"
Class Method Summary
collapse
Class Method Details
.new(dirpath) ⇒ Object
9
10
11
|
# File 'lib/diamante.rb', line 9
def self.new(dirpath)
Project.new(dirpath)
end
|
.show(filepath) ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/diamante.rb', line 13
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
|