Class: Unipept::HtmlFormatter

Inherits:
Formatter show all
Defined in:
lib/formatters.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Formatter

available, default, #format, formatters, #group_by_first_key, #integrate_fasta_headers, new_for_format, register

Class Method Details

.hidden?Boolean

Returns:

  • (Boolean)


356
357
358
# File 'lib/formatters.rb', line 356

def self.hidden?
  false
end

Instance Method Details

#convert(data, _first) ⇒ String

Converts the given input data to an HTML page that contains the Unipept visualizations

Parameters:

  • data (Array)

    The data we wish to convert

  • Is (Boolean)

    this the first output batch?

Returns:

  • (String)

    The converted input data in the Blast format



375
376
377
# File 'lib/formatters.rb', line 375

def convert(data, _first)
  data
end


364
365
366
# File 'lib/formatters.rb', line 364

def footer
  ''
end

#header(_data, _fasta_mapper = nil) ⇒ Object



360
361
362
# File 'lib/formatters.rb', line 360

def header(_data, _fasta_mapper = nil)
  ''
end

#typeString

Returns The type of the current formatter: html.

Returns:

  • (String)

    The type of the current formatter: html



352
353
354
# File 'lib/formatters.rb', line 352

def type
  'html'
end