Module: Iqvoc::Concept
- Defined in:
- lib/iqvoc.rb
Overview
************** Concept specific settings **************
Class Method Summary collapse
- .additional_association_classes ⇒ Object
-
.base_class ⇒ Object
Do not use the following method in models.
- .broader_relation_class ⇒ Object
- .further_labeling_classes ⇒ Object
- .further_relation_classes ⇒ Object
- .include_modules ⇒ Object
- .labeling_class_names ⇒ Object
- .labeling_classes ⇒ Object
- .match_classes ⇒ Object
- .note_classes ⇒ Object
- .pref_labeling_class ⇒ Object
- .relation_class_names ⇒ Object
- .relation_classes ⇒ Object
- .supports_multi_language_pref_labelings? ⇒ Boolean
Class Method Details
.additional_association_classes ⇒ Object
206 207 208 209 210 |
# File 'lib/iqvoc.rb', line 206 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_class ⇒ Object
Do not use the following method in models. This will probably cause a loading loop (something like “expected file xyz to load …”)
160 161 162 |
# File 'lib/iqvoc.rb', line 160 def self.base_class base_class_name.constantize end |
.broader_relation_class ⇒ Object
176 177 178 |
# File 'lib/iqvoc.rb', line 176 def self.broader_relation_class broader_relation_class_name.constantize end |
.further_labeling_classes ⇒ Object
180 181 182 183 184 |
# File 'lib/iqvoc.rb', line 180 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_classes ⇒ Object
194 195 196 |
# File 'lib/iqvoc.rb', line 194 def self.further_relation_classes further_relation_class_names.map(&:constantize) end |
.include_modules ⇒ Object
216 217 218 |
# File 'lib/iqvoc.rb', line 216 def self.include_modules include_module_names.map(&:constantize) end |
.labeling_class_names ⇒ Object
168 169 170 |
# File 'lib/iqvoc.rb', line 168 def self.labeling_class_names { pref_labeling_class_name => pref_labeling_languages }.merge(further_labeling_class_names) end |
.labeling_classes ⇒ Object
172 173 174 |
# File 'lib/iqvoc.rb', line 172 def self.labeling_classes { pref_labeling_class => pref_labeling_languages }.merge(further_labeling_classes) end |
.match_classes ⇒ Object
202 203 204 |
# File 'lib/iqvoc.rb', line 202 def self.match_classes match_class_names.map(&:constantize) end |
.note_classes ⇒ Object
198 199 200 |
# File 'lib/iqvoc.rb', line 198 def self.note_classes note_class_names.map(&:constantize) end |
.pref_labeling_class ⇒ Object
164 165 166 |
# File 'lib/iqvoc.rb', line 164 def self.pref_labeling_class pref_labeling_class_name.constantize end |
.relation_class_names ⇒ Object
186 187 188 |
# File 'lib/iqvoc.rb', line 186 def self.relation_class_names further_relation_class_names + [broader_relation_class_name, broader_relation_class.narrower_class.name] end |
.relation_classes ⇒ Object
190 191 192 |
# File 'lib/iqvoc.rb', line 190 def self.relation_classes relation_class_names.map(&:constantize) end |
.supports_multi_language_pref_labelings? ⇒ Boolean
212 213 214 |
# File 'lib/iqvoc.rb', line 212 def self.supports_multi_language_pref_labelings? pref_labeling_languages.size > 1 end |