Class: Kadryll::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/kadryll/cli.rb

Instance Method Summary collapse

Instance Method Details

#generateObject



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

def generate
  Kadryll.configure do |c|
    c.output_dir = options[:output]
  end
  exercises = Kadryll::ShorthandReader.read(options[:input])
  exercises.each do |exercise|
    drill = Kadryll::Drill.from_string(exercise, :prefix => options[:prefix])
    drill.generate_png
  end
end