class Ingreedy::RootParser

Attributes

original_query[R]

Public Class Methods

new(original_query) click to toggle source
# File lib/ingreedyfork/root_parser.rb, line 99
def initialize(original_query)
  @original_query = original_query
end

Public Instance Methods

parse() click to toggle source
Calls superclass method
# File lib/ingreedyfork/root_parser.rb, line 103
def parse
  super(original_query)
end

Private Instance Methods

prepositions() click to toggle source
# File lib/ingreedyfork/root_parser.rb, line 111
def prepositions
  Ingreedy.dictionaries.current.prepositions
end
unit_matches() click to toggle source
# File lib/ingreedyfork/root_parser.rb, line 115
def unit_matches
  @unit_matches ||= original_query.
                    scan(UnitVariationMapper.regexp).
                    sort_by(&:length).
                    reverse
end