Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #504

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
392adb1
CHapter 9 - Ask file modified to include return statement
alexanderwjrussell Sep 8, 2016
bb67619
CHapter 9 - Old Roman Numeral Converter Created
alexanderwjrussell Sep 8, 2016
6278084
CHapter 9 - New Roman Numeral Converter complete
alexanderwjrussell Sep 8, 2016
77da74e
CHapter 10 - Shuffle exercise complete (with help from the solutions)
alexanderwjrussell Sep 8, 2016
c84ea57
Chapter 10 - Sorting exercise complete (with help from the solution)
alexanderwjrussell Sep 8, 2016
f793330
Chapter 10 - Dictionary Sort complete (without aid from solutions, us…
alexanderwjrussell Sep 8, 2016
8e1c389
Chapter 10 - English Number Generator complete (with help from the so…
alexanderwjrussell Sep 8, 2016
c0839f3
CHapter 10 - Ninety-Nine Bottles of Beer complete (own solution with …
alexanderwjrussell Sep 8, 2016
25fdad7
CHapter 11 - Safer Picture Downloading, not complete. Struggled with …
alexanderwjrussell Sep 10, 2016
089a326
Chapter 11 - Built a PLaylist. Completed with aid from the solutions.
alexanderwjrussell Sep 10, 2016
71491bb
Chapter 11 - Build a Better Playlist. Completed using the solution an…
alexanderwjrussell Sep 10, 2016
015ef22
Chapter 12 - One Billion Seconds complete. Self worked.
alexanderwjrussell Sep 10, 2016
055331e
CHapter 12 - Happy Birthday Spanking completed. Self worked. Horrible…
alexanderwjrussell Sep 10, 2016
e715df8
Chapter 12 - Party Roman Numerals complete. Solution used and annotated
alexanderwjrussell Sep 10, 2016
035ed36
Chapter 12 - Birthday Helper completed. Solution used and annotated.
alexanderwjrussell Sep 10, 2016
b43272d
Chapter 13 - Extending Built in Classes complete. Roman numeral conve…
alexanderwjrussell Sep 10, 2016
6dc94d5
Chapter 13 - Orange Tree complete. Solution used to help with the ali…
alexanderwjrussell Sep 10, 2016
1ac1927
Chapter 13 - Interactive Baby Dragon complete. Solution used and anno…
alexanderwjrussell Sep 10, 2016
20518ed
Chapter 14 - Grandfather Clock complete. Self worked.
alexanderwjrussell Sep 10, 2016
0aa2dfd
Chapter 14 - Even Better Profiling complete. Modified the solution gi…
alexanderwjrussell Sep 11, 2016
fac85de
CHapter 14 - Program Logger complete. Solution modified to work with …
alexanderwjrussell Sep 11, 2016
ad4b7fd
Chapter 14 - Better Program Logger complete. Solution modiefied to wo…
alexanderwjrussell Sep 11, 2016
c6c0ce4
Fixes to pass the pull
alexanderwjrussell Sep 11, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CHapter 14 - Program Logger complete. Solution modified to work with …
…RSpec.
alexanderwjrussell committed Sep 11, 2016
commit fac85def382721a7cd683b86be875df498f8bc59
20 changes: 17 additions & 3 deletions ch14-blocks-and-procs/program_logger.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
def log desc, &block
# your code here
end
def program_log desc, &block
puts 'Beginning "' + desc + '"...'
result = block.call
puts '..."' + desc + '" finished, returning: ' + result.to_s
end

program_log 'outer block' do
program_log 'some little block' do
1**1 + 2**2
end

program_log 'yet another block' do
'!doof iahT ekil I'.reverse
end

'0' == 0
end