added PatternMatcher along with initial rspec test coverage