Class: ReportCard::Report
- Inherits:
-
Object
- Object
- ReportCard::Report
- Defined in:
- lib/report_card/report.rb
Defined Under Namespace
Classes: ReportNotFound
Class Method Summary collapse
Class Method Details
.all ⇒ Object
5 6 7 |
# File 'lib/report_card/report.rb', line 5 def self.all subclasses end |
.exists?(name) ⇒ Boolean
18 19 20 |
# File 'lib/report_card/report.rb', line 18 def self.exists?(name) all.any? { |r| r.name == name } end |
.find(name) ⇒ Object
13 14 15 16 |
# File 'lib/report_card/report.rb', line 13 def self.find(name) fail ReportNotFound, "Report #{name} not found" unless exists?(name) name.constantize end |
.human_name ⇒ Object
9 10 11 |
# File 'lib/report_card/report.rb', line 9 def self.human_name name.titleize end |