class StartsWithLetter

e.g. start with the letter t

Public Class Methods

find(options) click to toggle source
Calls superclass method Natural::Fragment::find
# File lib/natural/fragments/example.rb, line 32
def self.find(options)
  super options.merge(:looking_for => {:and => ['start with the letter', {:or => ('a'..'z').to_a}]})
end

Public Instance Methods

filter() click to toggle source
# File lib/natural/fragments/example.rb, line 35
def filter
  "select {|a| a[0].downcase == '#{self.children.last.to_s.downcase}'}"
end