Initial import

This commit is contained in:
Nick Thomas
2011-06-04 22:53:33 +01:00
commit 1e46836b46
8 changed files with 806 additions and 0 deletions

10
spec/spec_helper.rb Normal file
View File

@@ -0,0 +1,10 @@
require 'rspec'
$: << File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
def binary(str_ary)
str_ary.collect do |d|
raise ArgumentError.new("Bad part") unless d =~ /\A[a-f0-9]{2}\Z/i
d.to_i(16).chr
end.join("")
end