Top Level Namespace

Defined Under Namespace

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

Instance Method Summary collapse

Instance Method Details

#bagelObject



1519
1520
1521
# File 'lib/unroller.rb', line 1519

def bagel
  '...'
end

#block_taker(&block) ⇒ Object



1576
1577
1578
1579
1580
1581
1582
# File 'lib/unroller.rb', line 1576

def block_taker(&block)
  puts "I'm the block taker. I take blocks."
  puts "Please Step Over the next line."
  yield   # buggy! it keeps stopping at every line in the yielded block, but shouldn't. 
  # false:: (unroller.rb:1433) (line): ??
  puts "Done yielding to the block"
end

#bread!Object



1605
1606
1607
1608
1609
# File 'lib/unroller.rb', line 1605

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

#cheese!Object



1610
1611
1612
1613
1614
# File 'lib/unroller.rb', line 1610

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

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



108
109
110
111
112
113
114
115
116
117
# File 'lib/unroller.rb', line 108

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



1367
1368
1369
# File 'lib/unroller.rb', line 1367

def create_an_instance_of_UninterestingClassThatCluttersUpOnesTraces
  Uninteresting::ClassThatCluttersUpOnesTraces.new._a
end

#go_to_depth_and_call_1(depth, &block) ⇒ Object



1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
# File 'lib/unroller.rb', line 1177

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



1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
# File 'lib/unroller.rb', line 1187

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



1072
1073
1074
# File 'lib/unroller.rb', line 1072

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

#in_this_fileObject



1289
1290
1291
1292
1293
1294
# File 'lib/unroller.rb', line 1289

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

#jump!(how_high = 3) ⇒ Object



1100
1101
1102
1103
1104
# File 'lib/unroller.rb', line 1100

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

#method1Object



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

def method1; end

#method2Object



1119
1120
1121
# File 'lib/unroller.rb', line 1119

def method2
  'stuff!'
end

#method3Object



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

def method3; end

#method_1Object



1559
1560
1561
# File 'lib/unroller.rb', line 1559

def method_1
  'stuff'
end

#method_2Object



1562
1563
1564
# File 'lib/unroller.rb', line 1562

def method_2
  'stuff'
end

#my_very_own_methodObject



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

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



1615
1616
1617
1618
1619
# File 'lib/unroller.rb', line 1615

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

#raise_an_errorObject



1434
1435
1436
# File 'lib/unroller.rb', line 1434

def raise_an_error
  raise 'an error'
end

#subwayObject



1597
1598
1599
1600
1601
1602
1603
1604
# File 'lib/unroller.rb', line 1597

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



1493
1494
1495
# File 'lib/unroller.rb', line 1493

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