Sha256: b2e62d96c606d5d4f773227fc9e5753c44b96f8f16514204708d4ced3c3e95a2
Contents?: true
Size: 472 Bytes
Versions: 4
Compression:
Stored size: 472 Bytes
Contents
module Adhearsion module MenuDSL class StringMatchCalculator < MatchCalculator def match(query) args = { :query => query, :exact_matches => nil, :potential_matches => nil } if pattern == query.to_s args[:exact_matches] = [pattern] elsif pattern.starts_with? query.to_s args[:potential_matches] = [pattern] end new_calculated_match args end end # class StringMatchCalculator end end
Version data entries
4 entries across 4 versions & 1 rubygems