Class: Mongoid::Orderable::Installer
- Inherits:
-
Object
- Object
- Mongoid::Orderable::Installer
- Defined in:
- lib/mongoid/orderable/installer.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
-
#initialize(klass, options = {}) ⇒ Installer
constructor
A new instance of Installer.
- #setup ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
6 7 8 |
# File 'lib/mongoid/orderable/installer.rb', line 6 def config @config end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
6 7 8 |
# File 'lib/mongoid/orderable/installer.rb', line 6 def klass @klass end |
Instance Method Details
#setup ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/mongoid/orderable/installer.rb', line 13 def setup add_db_field add_db_index if config[:index] save_config include_mixins generate_all_helpers end |