Module: AdjustableSchema::Config::Naming

Includes:
Memery
Defined in:
lib/adjustable_schema/config.rb

Overview

:nodoc:

Instance Method Summary collapse

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

#recursiveObject



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

#referencesObject



25
# File 'lib/adjustable_schema/config.rb', line 25

def references = config :reference

#selfObject



24
# File 'lib/adjustable_schema/config.rb', line 24

def self       = config :self

#with_oppositeObject



37
38
39
# File 'lib/adjustable_schema/config.rb', line 37

def with_opposite
	index_with { opposite to: it }
end