Create pattern.rb

All functions need to run dot pattern comparrison