Module: Unidom::Common
- Defined in:
- lib/unidom/common.rb,
lib/unidom/common/engine.rb,
lib/unidom/common/version.rb,
lib/unidom/common/neglection.rb,
lib/unidom/common/numeration.rb,
lib/unidom/common/data_helper.rb,
lib/unidom/common/yaml_helper.rb,
lib/unidom/common/engine_extension.rb
Defined Under Namespace
Modules: ApplicationHelper, DataHelper, EngineExtension, YamlHelper Classes: ApplicationController, ApplicationJob, ApplicationMailer, ApplicationRecord, Engine, Neglection, Numeration
Constant Summary collapse
- NULL_UUID =
'00000000-0000-0000-0000-000000000000'.freeze
- MAXIMUM_AMOUNT =
1_000_000_000.freeze
- SELF =
'~'.freeze
- OPENED_AT =
Time.utc(1970).freeze
- CLOSED_AT =
Time.utc(3000).freeze
- FROM_DATE =
'1970-01-01'.freeze
- THRU_DATE =
'3000-01-01'.freeze
- STATE =
'C'.freeze
- VERSION =
'3.0'.freeze
Class Method Summary collapse
-
.configure {|options| ... } ⇒ Object
对 Unidom 的各个模块进行配置。如: Unidom::Common.configure do |options|.
Class Method Details
.configure {|options| ... } ⇒ Object
对 Unidom 的各个模块进行配置。如: Unidom::Common.configure do |options|
# neglected_namespaces 列出的命名空间对应的 migration 不会被执行, model 也不会被加载。
# 但 concern 、 validator 、 type 、 helper 、 controller 、 view 等都可以正常使用。
[:neglected_namespaces] = %w{
Unidom::Action
}
end
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/unidom/common.rb', line 35 def self.configure = {} yield = { neglected_namespaces: [] } self. = .merge puts 'Unidom::Common:' if self.[:neglected_namespaces].present? puts '-- neglected_namespaces' puts " -> #{self.[:neglected_namespaces].join ', '}" end end |