Class: Presentation::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/presentation/cli.rb

Instance Method Summary collapse

Instance Method Details

#new(name) ⇒ Object



10
11
12
13
14
# File 'lib/presentation/cli.rb', line 10

def new(name)
  create_file "#{name}/presentation.rb" do
    File.read File.expand_path("../../../examples/presentation.rb", __FILE__)
  end
end

#start(name = nil) ⇒ Object

method_option %w(theme -t) => ‘theme.rb’



18
19
20
21
22
23
24
# File 'lib/presentation/cli.rb', line 18

def start(name = nil)
  name ||= 'presentation.rb'
  p = Presentation.new
  p.load_slides_from_file File.expand_path(name)
  # TODO: p.load_theme File.expand_path(options[:theme])
  p.start
end