class Genomelink::Report

Report class to represent the reports API

@author [ashwin]

Attributes

phenotype[RW]
population[RW]
scores[RW]
summary[RW]

Public Class Methods

fetch(trait, token) click to toggle source

Method to get the report for a given trait. @param trait [String] A particular trait to fetch details for. @param token [Sting] Access token to be used.

@return [Report] A report object with summary, phenotype, population and scores.

# File lib/genomelink/reports.rb, line 14
def fetch(trait, token)
  new get(path_to_trait(trait), token)
end

Private Class Methods

path_to_trait(trait) click to toggle source

Method to return the path to hit to get report of a trait @param trait [String] A particular trait to fetch details for.

@return [String] path for the URL/request

# File lib/genomelink/reports.rb, line 23
def path_to_trait(trait)
  "/v1/reports/#{trait}?population=european"
end