Sha256: 105ed8be53260f574cf9156109ab6640d921d8d205784de8d6c83af3c9587f96
Contents?: true
Size: 591 Bytes
Versions: 2
Compression:
Stored size: 591 Bytes
Contents
# frozen_string_literal: true # Core SVG data for the Educational Proficiency insignia. # # This class should never need to be called directly. # @private class USPSFlags::Grades::EdPro class << self def get(grade) unless for_grade(grade) raise USPSFlags::Errors::InvalidInsignia, 'EdPro is only valid for grades AP, JN, N' end <<~SVG <rect x="0" y="100" width="#{USPSFlags::Grades::Grade.width(grade)}" height="20" fill="#{USPSFlags::Config::GOLD}" /> SVG end def for_grade(grade) %i[ap jn n].include?(grade) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
usps_flags-grades-0.1.1 | lib/usps_flags/grades/edpro.rb |
usps_flags-grades-0.1.0 | lib/usps_flags/grades/edpro.rb |