Module: Ronin::Model::HasDescription

Included in:
Campaign, Organization
Defined in:
lib/ronin/model/has_description.rb

Overview

Adds a description property to a model.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Adds the description property and ClassMethods to the model.

Parameters:

  • base (Class)

    The model.


37
38
39
40
41
42
43
44
45
# File 'lib/ronin/model/has_description.rb', line 37

def self.included(base)
  base.send :include, Model
  base.send :extend, ClassMethods

  base.module_eval do
    # The description of the model
    property :description, Model::Types::Description
  end
end