Class: DwcaHunter::ResourceEOL

Inherits:
Resource
  • Object
show all
Defined in:
lib/dwca_hunter/resources/eol.rb

Overview

Resource for FishBase

Instance Attribute Summary collapse

Attributes inherited from Resource

#command, #download_path, #url, #uuid

Instance Method Summary collapse

Methods inherited from Resource

#download, gunzip, #needs_download?, #needs_unpack?, unzip

Constructor Details

#initialize(opts = {}) ⇒ ResourceEOL

download: false, unpack: false})



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/dwca_hunter/resources/eol.rb', line 7

def initialize(opts = {}) #download: false, unpack: false})
  @command = "eol"
  @title = "Encyclopedia of Life"
  @abbr = "EOL"
  @url = "https://eol.org/data/provider_ids.csv.gz"
  @uuid = "dba5f880-a40d-479b-a1ad-a646835edde4"
  @download_dir = File.join(Dir.tmpdir, "dwca_hunter", "eol")
  @download_path = File.join(@download_dir, "eol.csv.gz")
  @extensions = []
  super
end

Instance Attribute Details

#abbrObject (readonly)

Returns the value of attribute abbr.



6
7
8
# File 'lib/dwca_hunter/resources/eol.rb', line 6

def abbr
  @abbr
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/dwca_hunter/resources/eol.rb', line 6

def title
  @title
end

Instance Method Details

#make_dwcaObject



23
24
25
26
# File 'lib/dwca_hunter/resources/eol.rb', line 23

def make_dwca
  organize_data
  generate_dwca
end

#unpackObject



19
20
21
# File 'lib/dwca_hunter/resources/eol.rb', line 19

def unpack
  unpack_gzip
end