Class: Sessions::Local
- Inherits:
-
Object
- Object
- Sessions::Local
- Includes:
- FileUtils
- Defined in:
- lib/ruby_drills/sessions/local.rb
Constant Summary collapse
- DIR =
'/usr/local/var/ruby_drills'
Instance Method Summary collapse
- #attempt(name, input, reference, result) ⇒ Object
- #command(name, input) ⇒ Object
-
#initialize ⇒ Local
constructor
A new instance of Local.
- #stats ⇒ Object
Constructor Details
Instance Method Details
#attempt(name, input, reference, result) ⇒ Object
19 20 21 |
# File 'lib/ruby_drills/sessions/local.rb', line 19 def attempt(name, input, reference, result) store({context: name, input: input, reference: reference, result: result, type: 'attempt'}) end |
#command(name, input) ⇒ Object
15 16 17 |
# File 'lib/ruby_drills/sessions/local.rb', line 15 def command(name, input) store({context: name, input: input, type: 'command'}) end |
#stats ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/ruby_drills/sessions/local.rb', line 23 def stats @db.transaction(true) do @db.roots.each do |key| puts @db[key].inspect end end end |