class ReportCard::Report

Attributes

params[RW]

Public Class Methods

all() click to toggle source
# File lib/report_card/report.rb, line 7
def self.all
  subclasses
end
exists?(name) click to toggle source
# File lib/report_card/report.rb, line 20
def self.exists?(name)
  all.any? { |r| r.name == name }
end
find(name) click to toggle source
# File lib/report_card/report.rb, line 15
def self.find(name)
  fail ReportNotFound, "Report #{name} not found" unless exists?(name)
  name.constantize
end
human_name() click to toggle source
# File lib/report_card/report.rb, line 11
def self.human_name
  name.titleize
end
new(params) click to toggle source
# File lib/report_card/report.rb, line 24
def initialize(params)
  self.params = params
end