Class: Genomelink::Report

Inherits:
Base
  • Object
show all
Defined in:
lib/genomelink/reports.rb

Overview

Report class to represent the reports API

Author:

  • ashwin

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

get, #initialize

Constructor Details

This class inherits a constructor from Genomelink::Base

Instance Attribute Details

#phenotypeObject

Returns the value of attribute phenotype.



7
8
9
# File 'lib/genomelink/reports.rb', line 7

def phenotype
  @phenotype
end

#populationObject

Returns the value of attribute population.



7
8
9
# File 'lib/genomelink/reports.rb', line 7

def population
  @population
end

#scoresObject

Returns the value of attribute scores.



7
8
9
# File 'lib/genomelink/reports.rb', line 7

def scores
  @scores
end

#summaryObject

Returns the value of attribute summary.



7
8
9
# File 'lib/genomelink/reports.rb', line 7

def summary
  @summary
end

Class Method Details

.fetch(trait, token) ⇒ Report

Method to get the report for a given trait.

Parameters:

  • trait (String)

    A particular trait to fetch details for.

  • token (Sting)

    Access token to be used.

Returns:

  • (Report)

    A report object with summary, phenotype, population and scores.



14
15
16
# File 'lib/genomelink/reports.rb', line 14

def fetch(trait, token)
  new get(path_to_trait(trait), token)
end