Permalink
Browse files

Minor re-ordering, update of overview.

  • Loading branch information...
1 parent 575e629 commit ae07a87d7dd8f8afde962d0a983d0d5b625977b6 @jaymcgavren committed Mar 15, 2011
@@ -100,7 +100,8 @@
store = PStore.new('storage.bin')
store.transaction do
store.roots.each do |name|
- puts "the #{name} says: '#{store[name]}'"
+ puts "the #{name} says:"
+ store[name].speak
end
end
@@ -25,9 +25,12 @@
require 'logger'
require 'open-uri'
file_size = 100000; file_count = 10
- logger = Logger.new('spider.log', file_count, file_size)
+ logger = Logger.new('spider.log',
+ file_count, file_size)
begin
- open('http://www.yahoo.com') {|f| logger.info f.status}
+ open('http://www.yahoo.com') do |u|
+ logger.info u.status
+ end
rescue Exception => e
logger.warn e
end
@@ -53,33 +56,32 @@
require 'test/unit'
class MyTest < Test::Unit::TestCase
def test_one
- assert_equal(:cat.to_s, "cat")
+ assert_equal("cat", :cat.to_s)
assert_in_delta(0.01, 0.009, 0.002)
end
def test_two
- assert_equal(2 + 2, 4)
- assert_equal(2 + 2, 5)
+ assert_equal(4, 2 + 2)
+ assert_equal(5, 2 + 2)
end
end
!SLIDE transition=scrollUp
Loaded suite -
Started
.F
- Finished in 0.008393 seconds.
+ Finished in 0.014912 seconds.
1) Failure:
test_two(MyTest) [-:9]:
- <4> expected but was
- <5>.
+ <5> expected but was
+ <4>.
2 tests, 4 assertions, 1 failures, 0 errors
!SLIDE bullets
#Other assertions
* assert_not_equal
-* assert_in_delta
* assert_kind_of
* assert_nil
* assert_raise
@@ -39,18 +39,13 @@
* open-uri
* Net::HTTP
* Net::*
-* Socket
+* DRb
!SLIDE bullets incremental transition=scrollUp
# Other
* Win32OLE
-* Ruby OSA on OS X
-* Singleton
-* Observable
-
-!SLIDE bullets incremental transition=scrollUp
-
* Logger
* Test::Unit
* OptionParser
+* Tk
@@ -85,7 +85,19 @@
puts YAML.dump(array)
puts YAML.dump(hash)
-
+
+!SLIDE transition=scrollUp
+ ---
+ - an
+ - array
+ - - of
+ - arrays
+ ---
+ :a: hash
+ :of:
+ :hashes:
+ :of: hashes
+
!SLIDE transition=scrollUp
@@@ruby
data = <<-EOD
@@ -127,6 +139,30 @@
!SLIDE transition=scrollUp
@@@ruby
+ indent_level = 2
+ xml.write($stdout, indent_level)
+
+!SLIDE transition=scrollUp
+ <?xml version='1.0' encoding='UTF-8'?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN">
+ <plist version='1.0'>
+ <array>
+ <dict>
+ <key>
+ data
+ </key>
+ <dict>
+ <key>
+ Apple URL pasteboard type
+ </key>
+ <string>
+ qss-http://www.google.com/search?hl=en&amp;q=***&amp;num=100
+ </string>
+ </dict>
+ ...
+
+!SLIDE transition=scrollUp
+ @@@ruby
xml.elements.each('//key') do |key|
print "#{key.text}: "
if key.next_sibling
@@ -148,26 +184,3 @@
QSObjectName: Google Code Search
QSObjectType: Apple URL pasteboard type
-!SLIDE transition=scrollUp
- @@@ruby
- indent_level = 2
- xml.write($stdout, indent_level)
-
-!SLIDE transition=scrollUp
- <?xml version='1.0' encoding='UTF-8'?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN">
- <plist version='1.0'>
- <array>
- <dict>
- <key>
- data
- </key>
- <dict>
- <key>
- Apple URL pasteboard type
- </key>
- <string>
- qss-http://www.google.com/search?hl=en&amp;q=***&amp;num=100
- </string>
- </dict>
- ...

0 comments on commit ae07a87

Please sign in to comment.