Module: Ronin::Model::HasName
Overview
Adds a name
property to a model.
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
Adds the
name
property and ClassMethods to the model.
Class Method Details
.included(base) ⇒ Object
Adds the name
property and ClassMethods to the model.
36 37 38 39 40 41 42 43 44 |
# File 'lib/ronin/model/has_name.rb', line 36 def self.included(base) base.send :include, Model, InstanceMethods base.send :extend, ClassMethods base.module_eval do # The name of the model property :name, String, :required => true, :index => true end end |