Top Level Namespace

Defined Under Namespace

Modules: ActiveMongoose, ActiveSupport, Gem, Kernel, Uninteresting Classes: Foo, Interesting, String, TheTest, Unroller, Wasabi

Instance Method Summary collapse

Instance Method Details

#bagelObject



1439
1440
1441
# File 'lib/unroller.rb', line 1439

def bagel
  '...'
end

#block_taker(&block) ⇒ Object



1496
1497
1498
1499
1500
1501
1502
# File 'lib/unroller.rb', line 1496

def block_taker(&block)
  puts "I'm the block taker. I take blocks."
  puts "Please Step Over the next line."
  yield   # buggy!
  # false:: (unroller.rb:1433) (line): ??
  puts "Done yielding to the block"
end

#bread!Object



1525
1526
1527
1528
1529
# File 'lib/unroller.rb', line 1525

def bread!
  _do = nil
  _do = nil
  _do = nil
end

#cheese!Object



1530
1531
1532
1533
1534
# File 'lib/unroller.rb', line 1530

def cheese!
  _do = nil
  _do = nil
  _do = nil
end

#confirm(question, options = ['Yes', 'No']) ⇒ Object



65
66
67
68
69
70
71
72
73
74
# File 'lib/unroller.rb', line 65

def confirm(question, options = ['Yes', 'No'])
  print question + " " +
    "Yes".menu_item(:red) + ", " +
    "No".menu_item(:green) + 
    " > "
  response = ''
  # Currently allow user to press Enter to accept the default.
  response = $stdin.getc.chr.downcase while !['y', 'n', "\n"].include?(begin response.downcase!; response end)
  response
end

#create_an_instance_of_UninterestingClassThatCluttersUpOnesTracesObject



1287
1288
1289
# File 'lib/unroller.rb', line 1287

def create_an_instance_of_UninterestingClassThatCluttersUpOnesTraces
  Uninteresting::ClassThatCluttersUpOnesTraces.new.a
end

#go_to_depth_and_call_1(depth, &block) ⇒ Object



1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
# File 'lib/unroller.rb', line 1097

def go_to_depth_and_call_1(depth, &block)
  #puts caller(0).size
  if caller(0).size == depth
    puts 'calling a'
    block.call
  else
    go_to_depth_and_call_2(depth, &block)
  end
  #puts caller(0).size
end

#go_to_depth_and_call_2(depth, &block) ⇒ Object

puts caller(0).size



1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
# File 'lib/unroller.rb', line 1107

def go_to_depth_and_call_2(depth, &block)
  #puts caller(0).size
  if caller(0).size == depth
    puts 'calling a'
    block.call
  else
    go_to_depth_and_call_1(depth, &block)
  end
  #puts caller(0).size
end

#herald(message) ⇒ Object



992
993
994
# File 'lib/unroller.rb', line 992

def herald(message)
  puts message.ljust(130).bold.white.on_magenta
end

#in_this_fileObject



1209
1210
1211
1212
1213
1214
# File 'lib/unroller.rb', line 1209

def in_this_file
  a = 'a'
  b = 'b'
  c = 'c'
  etc = 'etc.'
end

#jump!(how_high = 3) ⇒ Object



1020
1021
1022
1023
1024
# File 'lib/unroller.rb', line 1020

def jump!(how_high = 3)
  how_high.times do
    'jump!'
  end
end

#method1Object



1038
# File 'lib/unroller.rb', line 1038

def method1; end

#method2Object



1039
1040
1041
# File 'lib/unroller.rb', line 1039

def method2
  'stuff!'
end

#method3Object



1042
# File 'lib/unroller.rb', line 1042

def method3; end

#method_1Object



1479
1480
1481
# File 'lib/unroller.rb', line 1479

def method_1
  'stuff'
end

#method_2Object



1482
1483
1484
# File 'lib/unroller.rb', line 1482

def method_2
  'stuff'
end

#my_very_own_methodObject



1416
1417
1418
1419
1420
1421
1422
# File 'lib/unroller.rb', line 1416

def my_very_own_method
  Unroller::trace :show_args => false, :show_locals => true do
    sum = sum(1, 2, 3)
    sum
    sum = sum(3, 3, 3)
  end
end

#pickles!Object



1535
1536
1537
1538
1539
# File 'lib/unroller.rb', line 1535

def pickles!
  _do = nil
  _do = nil
  _do = nil
end

#raise_an_errorObject



1354
1355
1356
# File 'lib/unroller.rb', line 1354

def raise_an_error
  raise 'an error'
end

#subwayObject



1517
1518
1519
1520
1521
1522
1523
1524
# File 'lib/unroller.rb', line 1517

def subway
  question = 'What kind of bread would you like?'
  bread!
  question = 'Would you like any cheese?'
  cheese!
  question = 'Would you like pickles on that?'
  pickles!
end

#sum(a, b, c) ⇒ Object



1413
1414
1415
# File 'lib/unroller.rb', line 1413

def sum(a, b, c)
  a + b + c
end