Module: ShintyokuDoudesuka

Defined in:
lib/shintyoku_doudesuka.rb,
lib/shintyoku_doudesuka/version.rb

Defined Under Namespace

Classes: Talk

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.clearObject



47
48
49
# File 'lib/shintyoku_doudesuka.rb', line 47

def clear
  print "\r#{' '*70}"
end

.runObject



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/shintyoku_doudesuka.rb', line 51

def run
  ta = Talk.new
  until ta.finished?
    clear
    print "\r"

    ta.recover if rand(5) > 2
    ta.raise_problem if rand(10) > 7
    ta.succeed
    ta.comment
    sleep 1
  end
  puts ""
  puts "できました"
end

Instance Method Details

#runObject



69
70
71
# File 'lib/shintyoku_doudesuka.rb', line 69

def run
  Talk.run
end