Class: ClassifyConcern

Inherits:
Object
  • Object
show all
Includes:
ActiveAttr::Model
Defined in:
app/models/classify_concern.rb

Constant Summary collapse

VALID_CURATION_CONCERNS =

or detected on load

{
  'Mock Curation Concern' => 'MockCurationConcern'
}

Instance Method Summary collapse

Instance Method Details

#curation_concern_classObject



21
22
23
24
25
26
27
28
29
# File 'app/models/classify_concern.rb', line 21

def curation_concern_class
  if possible_curation_concern_types.detect{|name, class_name|
      class_name == curation_concern_type
    }
    curation_concern_type.constantize
  else
    raise RuntimeError, "Invalid :curation_concern_type"
  end
end

#possible_curation_concern_typesObject



17
18
19
# File 'app/models/classify_concern.rb', line 17

def possible_curation_concern_types
  VALID_CURATION_CONCERNS
end