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