module SmartExcerpt::ClassMethods

Public Instance Methods

smart_excerpt(excerpt_field, base_field, words = 25) click to toggle source
# File lib/smart_excerpt.rb, line 68
def smart_excerpt(excerpt_field, base_field, words = 25)
  define_method("get_#{excerpt_field}".to_sym) do |c_words = words|
    smart_truncate(self, base_field, excerpt_field, c_words)
  end
end