Module: Iqvoc::Concept

Defined in:
lib/iqvoc.rb

Overview

************** Concept specific settings **************

Class Method Summary collapse

Class Method Details

.additional_association_classesObject



204
205
206
207
208
# File 'lib/iqvoc.rb', line 204

def self.additional_association_classes
  additional_association_class_names.keys.each_with_object({}) do |class_name, hash|
    hash[class_name.constantize] = additional_association_class_names[class_name]
  end
end

.base_classObject

Do not use the following method in models. This will probably cause a loading loop (something like “expected file xyz to load …”)



158
159
160
# File 'lib/iqvoc.rb', line 158

def self.base_class
  base_class_name.constantize
end

.broader_relation_classObject



174
175
176
# File 'lib/iqvoc.rb', line 174

def self.broader_relation_class
  broader_relation_class_name.constantize
end

.further_labeling_classesObject



178
179
180
181
182
# File 'lib/iqvoc.rb', line 178

def self.further_labeling_classes
  further_labeling_class_names.keys.each_with_object({}) do |class_name, hash|
    hash[class_name.constantize] = further_labeling_class_names[class_name]
  end
end

.further_relation_classesObject



192
193
194
# File 'lib/iqvoc.rb', line 192

def self.further_relation_classes
  further_relation_class_names.map(&:constantize)
end

.include_modulesObject



214
215
216
# File 'lib/iqvoc.rb', line 214

def self.include_modules
  include_module_names.map(&:constantize)
end

.labeling_class_namesObject



166
167
168
# File 'lib/iqvoc.rb', line 166

def self.labeling_class_names
  { pref_labeling_class_name => pref_labeling_languages }.merge(further_labeling_class_names)
end

.labeling_classesObject



170
171
172
# File 'lib/iqvoc.rb', line 170

def self.labeling_classes
  { pref_labeling_class => pref_labeling_languages }.merge(further_labeling_classes)
end

.match_classesObject



200
201
202
# File 'lib/iqvoc.rb', line 200

def self.match_classes
  match_class_names.map(&:constantize)
end

.note_classesObject



196
197
198
# File 'lib/iqvoc.rb', line 196

def self.note_classes
  note_class_names.map(&:constantize)
end

.pref_labeling_classObject



162
163
164
# File 'lib/iqvoc.rb', line 162

def self.pref_labeling_class
  pref_labeling_class_name.constantize
end

.relation_class_namesObject



184
185
186
# File 'lib/iqvoc.rb', line 184

def self.relation_class_names
  further_relation_class_names + [broader_relation_class_name, broader_relation_class.narrower_class.name]
end

.relation_classesObject



188
189
190
# File 'lib/iqvoc.rb', line 188

def self.relation_classes
  relation_class_names.map(&:constantize)
end

.supports_multi_language_pref_labelings?Boolean

Returns:

  • (Boolean)


210
211
212
# File 'lib/iqvoc.rb', line 210

def self.supports_multi_language_pref_labelings?
  pref_labeling_languages.size > 1
end