Class: Inferno::Terminology::Tasks::CreateValueSetValidators
- Inherits:
-
Object
- Object
- Inferno::Terminology::Tasks::CreateValueSetValidators
- Includes:
- TempDir
- Defined in:
- lib/inferno/terminology/tasks/create_value_set_validators.rb
Instance Attribute Summary collapse
-
#delete_existing ⇒ Object
readonly
Returns the value of attribute delete_existing.
-
#minimum_binding_strength ⇒ Object
readonly
Returns the value of attribute minimum_binding_strength.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #db_for_version ⇒ Object
-
#initialize(minimum_binding_strength:, version:, delete_existing:, type:) ⇒ CreateValueSetValidators
constructor
A new instance of CreateValueSetValidators.
- #run ⇒ Object
Methods included from TempDir
#pipe_files, #umls_dir, #umls_subset_dir, #umls_zip_path, #versioned_temp_dir
Constructor Details
#initialize(minimum_binding_strength:, version:, delete_existing:, type:) ⇒ CreateValueSetValidators
Returns a new instance of CreateValueSetValidators.
11 12 13 14 15 16 |
# File 'lib/inferno/terminology/tasks/create_value_set_validators.rb', line 11 def initialize(minimum_binding_strength:, version:, delete_existing:, type:) @minimum_binding_strength = minimum_binding_strength @version = version @delete_existing = delete_existing != 'false' @type = type.to_sym end |
Instance Attribute Details
#delete_existing ⇒ Object (readonly)
Returns the value of attribute delete_existing.
9 10 11 |
# File 'lib/inferno/terminology/tasks/create_value_set_validators.rb', line 9 def delete_existing @delete_existing end |
#minimum_binding_strength ⇒ Object (readonly)
Returns the value of attribute minimum_binding_strength.
9 10 11 |
# File 'lib/inferno/terminology/tasks/create_value_set_validators.rb', line 9 def minimum_binding_strength @minimum_binding_strength end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/inferno/terminology/tasks/create_value_set_validators.rb', line 9 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
9 10 11 |
# File 'lib/inferno/terminology/tasks/create_value_set_validators.rb', line 9 def version @version end |
Instance Method Details
#db_for_version ⇒ Object
28 29 30 |
# File 'lib/inferno/terminology/tasks/create_value_set_validators.rb', line 28 def db_for_version File.join(versioned_temp_dir, 'umls.db') end |
#run ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/inferno/terminology/tasks/create_value_set_validators.rb', line 18 def run Loader.register_umls_db db_for_version Loader.load_value_sets_from_directory(PACKAGE_DIR, true) Loader.create_validators( type:, minimum_binding_strength:, delete_existing: ) end |