class TaxonReporter::Report
Public Class Methods
load_data(name)
click to toggle source
# File lib/taxon_reporter/report.rb, line 16 def self.load_data(name) result = [] @@data_sources.each do |ds| result += ds.taxons_from_name(name) end result end
new(name)
click to toggle source
# File lib/taxon_reporter/report.rb, line 10 def initialize(name) @taxons = [] @fields = [] TaxonReporter::Report.load_data(name).each {|t| add_taxon(t)} end
Public Instance Methods
add_taxon(taxon)
click to toggle source
# File lib/taxon_reporter/report.rb, line 24 def add_taxon(taxon) @taxons.push(taxon) @fields += taxon.fields end
fields()
click to toggle source
# File lib/taxon_reporter/report.rb, line 8 def fields; @fields; end
taxons()
click to toggle source
# File lib/taxon_reporter/report.rb, line 7 def taxons; @taxons; end