Module: Ronin::Model::HasTitle::ClassMethods

Defined in:
lib/ronin/model/has_title.rb

Overview

Class methods that are added when Ronin::Model::HasTitle are included into a model.

Instance Method Summary collapse

Instance Method Details

#titled(fragment) ⇒ Array<Model>

Finds models with titles containing a given fragment of text.

Examples:

Vuln.titled 'bypass'

Parameters:

  • fragment (String)

    The fragment of text to match titles with.

Returns:

  • (Array<Model>)

    The found models.



65
66
67
# File 'lib/ronin/model/has_title.rb', line 65

def titled(fragment)
  all(:title.like => "%#{fragment}%")
end