Class: Sum

Inherits:
Natural::Fragment show all
Defined in:
lib/natural/fragments/misc.rb

Overview

e.g. spent, total

Instance Attribute Summary

Attributes inherited from Natural::Fragment

#filter, #score, #text

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Natural::Fragment

#all_filters, #clone, #data, #id_range, #ids, #ids=, #initialize, #pretty_to_s, recurse_alternatives, #to_s

Constructor Details

This class inherits a constructor from Natural::Fragment

Class Method Details

.find(options) ⇒ Object



24
25
26
# File 'lib/natural/fragments/misc.rb', line 24

def self.find(options)
  super options.merge(:looking_for => {:or => ['spend', 'spent', 'total', {:and => ['how much did', Pronoun , 'spend']}, {:and => ['how much have', Pronoun, 'spent']}]})
end

Instance Method Details

#aggregatorObject



27
28
29
# File 'lib/natural/fragments/misc.rb', line 27

def aggregator
  'sum'
end