Sha256: 362d97a45d8868eeb39fc5db6c63295062ab18fb7811719b8734c7d4fb1d40e5

Contents?: true

Size: 612 Bytes

Versions: 10

Compression:

Stored size: 612 Bytes

Contents

#!/usr/bin/env ruby
require 'gli'
require 'hemlock'
require 'rainbow'

include GLI::App

program_desc 'Memorization through repetitive writing - Socrates is not amused'

version Hemlock::VERSION

command :drink do |c|
  c.desc "Crito, we owe a rooster to Asclepius. Please, don't forget to pay the debt."

  c.action do |global_options, options, args|
    number_of_turns = args.empty? ? 5 : args.first.to_i
    flashcards = Hemlock::CSVtoFlashcards.create_flashcards
    number_of_turns.times do
      flashcard = flashcards.sample
      Hemlock::Turn.new(flashcard).take_turn
    end
  end
end

exit run(ARGV)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hemlock-0.1.8 bin/hemlock
hemlock-0.1.7 bin/hemlock
hemlock-0.1.6 bin/hemlock
hemlock-0.1.5 bin/hemlock
hemlock-0.1.4 bin/hemlock
hemlock-0.1.3 bin/hemlock
hemlock-0.1.2 bin/hemlock
hemlock-0.1.1 bin/hemlock
hemlock-0.1.0 bin/hemlock
hemlock-0.0.9 bin/hemlock