Sha256: 5628871660e14b8f6ecfe130977cfb872a75eff7c8d15ec2f74f6496eda7a2a7
Contents?: true
Size: 612 Bytes
Versions: 16
Compression:
Stored size: 612 Bytes
Contents
# encoding: utf-8 module Adhearsion class CallController module MenuDSL class StringMatchCalculator < MatchCalculator def match(query) args = { :query => query, :exact_matches => nil, :potential_matches => nil } pattern_string = pattern.to_s query_string = query.to_s if pattern_string == query_string args[:exact_matches] = [pattern] elsif pattern_string.starts_with? query_string args[:potential_matches] = [pattern] end new_calculated_match args end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems