Sha256: a28162b69a321eae2aa0be82b2da53d986630cc7f48fd14acec4eea5a9339e81

Contents?: true

Size: 551 Bytes

Versions: 2

Compression:

Stored size: 551 Bytes

Contents

# frozen_string_literal: true

require 'extra/enum'

class ProjectType < Enum

  items :collection,
        :umbrella,
        :contest,
        :bioblitz,
        :assessment,
        :manual

  # TODO: переделать тип во что-то универсальное. наверное.

  class << self

    def parse src
      if src == ''
        return ProjectType::MANUAL
      else
        super src
      end
    end

  end

  def to_s
    if self == ProjectType::MANUAL
      return ''
    else
      super
    end
  end

  freeze
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
inat-get-0.8.0.12 lib/inat/data/enums/projecttype.rb
inat-get-0.8.0.11 lib/inat/data/enums/projecttype.rb