Module: AdjustableSchema::Config::Naming
- Includes:
- Memery
- Defined in:
- lib/adjustable_schema/config.rb
Overview
:nodoc:
Instance Method Summary collapse
- #opposite(to:) ⇒ Object
- #recursive ⇒ Object
- #references ⇒ Object
- #self ⇒ Object
- #with_opposite ⇒ Object
Instance Method Details
#opposite(to:) ⇒ Object
33 34 35 |
# File 'lib/adjustable_schema/config.rb', line 33 def opposite to: grep_v(to).sole end |
#recursive ⇒ Object
27 28 29 30 31 |
# File 'lib/adjustable_schema/config.rb', line 27 def recursive config.values.to_h do [ it[:self].to_s.pluralize.to_sym, it[:recursive].to_sym ] end end |
#references ⇒ Object
25 |
# File 'lib/adjustable_schema/config.rb', line 25 def references = config :reference |
#self ⇒ Object
24 |
# File 'lib/adjustable_schema/config.rb', line 24 def self = config :self |
#with_opposite ⇒ Object
37 38 39 |
# File 'lib/adjustable_schema/config.rb', line 37 def with_opposite index_with { opposite to: it } end |