Module: ZooniverseData
- Defined in:
- lib/zooniverse_data.rb,
lib/zooniverse_data/helpers.rb,
lib/zooniverse_data/version.rb,
lib/zooniverse_data/projects.rb,
lib/zooniverse_data/helpers/base.rb,
lib/zooniverse_data/helpers/images.rb,
lib/zooniverse_data/projects/condor.rb,
lib/zooniverse_data/projects/orchid.rb,
lib/zooniverse_data/projects/default.rb,
lib/zooniverse_data/projects/penguin.rb,
lib/zooniverse_data/projects/sunspot.rb,
lib/zooniverse_data/helpers/transport.rb,
lib/zooniverse_data/projects/asteroid.rb,
lib/zooniverse_data/projects/milky_way.rb,
lib/zooniverse_data/projects/serengeti.rb,
lib/zooniverse_data/projects/higgs_hunter.rb,
lib/zooniverse_data/projects/illustratedlife.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'1.0.2'
Class Attribute Summary collapse
-
.projects ⇒ Object
Returns the value of attribute projects.
Class Method Summary collapse
Class Attribute Details
.projects ⇒ Object
Returns the value of attribute projects.
5 6 7 |
# File 'lib/zooniverse_data.rb', line 5 def projects @projects end |
Class Method Details
.dispatch(manifest: nil, entry: nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/zooniverse_data.rb', line 9 def self.dispatch(manifest: nil, entry: nil) klass = self.projects[manifest.project_id] unless klass klass_name = manifest.project.name.classify klass = if ZooniverseData::Projects.const_defined?(klass_name) "ZooniverseData::Projects::#{ klass_name }".constantize else ZooniverseData::Projects::Default end self.projects[manifest.project_id] = klass end klass.new.customize manifest: manifest, entry: entry end |