Module: Lolita::Configuration

Defined in:
lib/lolita/configuration.rb,
lib/lolita/configuration/tab.rb,
lib/lolita/configuration/base.rb,
lib/lolita/configuration/core.rb,
lib/lolita/configuration/list.rb,
lib/lolita/configuration/tabs.rb,
lib/lolita/configuration/field.rb,
lib/lolita/configuration/action.rb,
lib/lolita/configuration/column.rb,
lib/lolita/configuration/fields.rb,
lib/lolita/configuration/filter.rb,
lib/lolita/configuration/search.rb,
lib/lolita/configuration/columns.rb,
lib/lolita/configuration/field_set.rb,
lib/lolita/configuration/field/date.rb,
lib/lolita/configuration/field/enum.rb,
lib/lolita/configuration/field/hash.rb,
lib/lolita/configuration/field/time.rb,
lib/lolita/configuration/factory/tab.rb,
lib/lolita/configuration/field/array.rb,
lib/lolita/configuration/field/float.rb,
lib/lolita/configuration/field/range.rb,
lib/lolita/configuration/nested_form.rb,
lib/lolita/configuration/nested_list.rb,
lib/lolita/configuration/tab/content.rb,
lib/lolita/configuration/tab/default.rb,
lib/lolita/configuration/field/hidden.rb,
lib/lolita/configuration/field/string.rb,
lib/lolita/configuration/field/symbol.rb,
lib/lolita/configuration/factory/field.rb,
lib/lolita/configuration/field/boolean.rb,
lib/lolita/configuration/field/integer.rb,
lib/lolita/configuration/field/date_time.rb,
lib/lolita/configuration/field/big_decimal.rb

Overview

All classes that want to use lolita for configuration should include this module.

Defined Under Namespace

Modules: ClassMethods, Factory, Field, Tab Classes: Action, Base, Column, Columns, Core, FieldSet, Fields, Filter, List, NestedForm, NestedList, Search, Tabs

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

When Lolita::Configuration is included, it add hook for class :after_lolita_loaded and define class methods lolita and lolita= and instance method lolita that refers to class method with same name.


6
7
8
9
10
11
12
13
14
15
16
# File 'lib/lolita/configuration.rb', line 6

def self.included(base)
  base.class_eval do
    include Lolita::Hooks
    add_hook :after_lolita_loaded

    extend ClassMethods
    def lolita
      self.class.lolita
    end
  end
end