Module: Blirb::Behaviors::InstanceMethods

Defined in:
lib/blirb/behaviors.rb

Instance Method Summary collapse

Instance Method Details

#doneObject



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/blirb/behaviors.rb', line 23

def done
  b = context.workspace.binding
  Object.class_eval do
    if @blirb.current_task.test!(b)
      puts "Nice. That worked."
      puts "========================="
      @blirb.menu
    else
      puts "Test failed. Try again."
    end
  end
end

#help!Object



9
10
11
12
13
14
15
# File 'lib/blirb/behaviors.rb', line 9

def help!
  puts 
  Blirb::COMMANDS.each do |command|
    puts %{\t\t#{command}}
  end
  puts 
end

#taskObject



17
18
19
20
21
# File 'lib/blirb/behaviors.rb', line 17

def task
  Object.class_eval do
    puts @blirb.current_task.description if @blirb.current_task
  end
end