Sha256: c7dc635854837679d9bda8700ea8825c4540bde99516050d63baa31ffe31be8b

Contents?: true

Size: 545 Bytes

Versions: 11

Compression:

Stored size: 545 Bytes

Contents

# 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)
      raise USPSFlags::Errors::InvalidInsignia, "EdPro is only valid for grades AP, JN, N" unless for_grade(grade)

      <<~SVG
        <rect x="0" y="100" width="#{USPSFlags::Grades::Grade.width(grade)}" height="15" fill="#{USPSFlags::Config::GOLD}" />
      SVG
    end

    def for_grade(grade)
      [:ap, :jn, :n].include?(grade)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
usps_flags-grades-0.0.11 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.10 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.9 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.8 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.7 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.6 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.5 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.4 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.3 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.2 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.0.1 lib/usps_flags/grades/edpro.rb