Module: Ronin::Model::HasDescription::ClassMethods

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#describing(fragment) ⇒ Array<Model>

Finds models with descriptions containing a given fragment of text.

Examples:

Exploit.describing 'bypass'

Parameters:

  • fragment (String)

    The fragment of text to match descriptions with.

Returns:

  • (Array<Model>)

    The found models.



67
68
69
# File 'lib/ronin/model/has_description.rb', line 67

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