Class: DayNames

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

Overview

e.g. days of the week

Instance Attribute Summary

Attributes inherited from Natural::Fragment

#aggregator, #filter, #score, #text

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Natural::Fragment

#all_filters, #clone, #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



15
16
17
# File 'lib/natural/fragments/example.rb', line 15

def self.find(options)
  super options.merge(:looking_for => ['days of the week'])
end

Instance Method Details

#data(context) ⇒ Object



18
19
20
# File 'lib/natural/fragments/example.rb', line 18

def data(context)
  Date::DAYNAMES
end