Class: Casento::Occurrence

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/casento/occurrence.rb

Instance Method Summary collapse

Instance Method Details

#dwc_classObject



12
13
14
# File 'lib/casento/occurrence.rb', line 12

def dwc_class
  "Insecta"
end

#infraspecificEpithetObject



20
21
22
# File 'lib/casento/occurrence.rb', line 20

def infraspecificEpithet
  subspecies
end

#kingdomObject



4
5
6
# File 'lib/casento/occurrence.rb', line 4

def kingdom
  "Animalia"
end

#nameObject



57
58
59
# File 'lib/casento/occurrence.rb', line 57

def name
  [genus, species, subspecies].compact.join(" ").strip
end

#phylumObject



8
9
10
# File 'lib/casento/occurrence.rb', line 8

def phylum
  "Arthropoda"
end

#scientificNameObject



24
25
26
# File 'lib/casento/occurrence.rb', line 24

def scientificName
  name
end

#speciesObject



61
62
63
# File 'lib/casento/occurrence.rb', line 61

def species
  super =~ /spp/ ? nil : super      
end

#specificEpithetObject



16
17
18
# File 'lib/casento/occurrence.rb', line 16

def specificEpithet
  species
end

#stateObject



28
29
30
# File 'lib/casento/occurrence.rb', line 28

def state
  super.gsub(/\(state of\)/i, "").strip
end

#stateProvinceObject



32
33
34
# File 'lib/casento/occurrence.rb', line 32

def stateProvince
  state
end