Module: AdjustableSchema::Config
- Includes:
- Memery
- Defined in:
- lib/adjustable_schema/config.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Naming
Class Method Summary collapse
Class Method Details
.association_names ⇒ Object
79 |
# File 'lib/adjustable_schema/config.rb', line 79 def association_names = Engine.config.names[:associations] |
.find_direction ⇒ Object
62 63 64 65 |
# File 'lib/adjustable_schema/config.rb', line 62 def find_direction(...) normalize(...) .find { |dir, *| dir.in? association_directions } end |
.normalize(**options) ⇒ Object
81 82 83 84 85 86 87 88 |
# File 'lib/adjustable_schema/config.rb', line 81 def normalize ** shortcuts .tap { .assert_valid_keys it.keys, it.values } .select { _2.in? } .each { [_1] = .delete _2 } end |