Class: DwcaHunter::ResourceFishbase
- Defined in:
- lib/dwca_hunter/resources/fishbase.rb
Overview
Resource for FishBase
Instance Attribute Summary collapse
-
#abbr ⇒ Object
readonly
Returns the value of attribute abbr.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Attributes inherited from Resource
#command, #download_path, #url, #uuid
Instance Method Summary collapse
- #download ⇒ Object
-
#initialize(opts = {}) ⇒ ResourceFishbase
constructor
A new instance of ResourceFishbase.
- #make_dwca ⇒ Object
- #unpack ⇒ Object
Methods inherited from Resource
gunzip, #needs_download?, #needs_unpack?, unzip
Constructor Details
#initialize(opts = {}) ⇒ ResourceFishbase
Returns a new instance of ResourceFishbase.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/dwca_hunter/resources/fishbase.rb', line 5 def initialize(opts = {}) @command = "fishbase" @title = "FishBase Cache" @abbr = "FishBase Cache" @uuid = "bacd21f0-44e0-43e2-914c-70929916f257" @download_path = File.join(Dir.tmpdir, "dwca_hunter", "fishbase", "fishbase.tsv") @extensions = [] super end |
Instance Attribute Details
#abbr ⇒ Object (readonly)
Returns the value of attribute abbr.
4 5 6 |
# File 'lib/dwca_hunter/resources/fishbase.rb', line 4 def abbr @abbr end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'lib/dwca_hunter/resources/fishbase.rb', line 4 def title @title end |
Instance Method Details
#download ⇒ Object
16 17 18 19 |
# File 'lib/dwca_hunter/resources/fishbase.rb', line 16 def download FileUtils.cp(File.join(__dir__, "..", "..", "files", "fishbase_taxon_cache.tsv"), @download_path) end |
#make_dwca ⇒ Object
24 25 26 27 |
# File 'lib/dwca_hunter/resources/fishbase.rb', line 24 def make_dwca organize_data generate_dwca end |
#unpack ⇒ Object
21 22 |
# File 'lib/dwca_hunter/resources/fishbase.rb', line 21 def unpack end |