Class: INat::Data::Types::ProjectType

Inherits:
Enum
  • Object
show all
Defined in:
lib/inat/data/enums/projecttype.rb

Overview

TODO: подумать над занесением внутрь Project

Instance Attribute Summary

Attributes inherited from Enum

#data, #description, #name, #order

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Enum

#<=>, [], aliases, ddl, each, from_db, get, #initialize, #inspect, #intern, item, item_alias, items, old_parse, #pred, #succ, to_a, #to_db, to_h, #to_i, #to_query, values

Constructor Details

This class inherits a constructor from Enum

Class Method Details

.parse(src) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/inat/data/enums/projecttype.rb', line 20

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

Instance Method Details

#to_sObject



30
31
32
33
34
35
36
# File 'lib/inat/data/enums/projecttype.rb', line 30

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