Sha256: 6ee0ab5c933d3c9dbc0e3d3d576bc8aba0f6d72d8d70061af7574a192e4ebd20

Contents?: true

Size: 647 Bytes

Versions: 4

Compression:

Stored size: 647 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
  class Grades
    class 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="20" fill="#{USPSFlags::Config::GOLD}" />
          SVG
        end

        def for_grade(grade)
          %i[ap jn n].include?(grade)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
usps_flags-grades-0.1.6 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.1.5 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.1.3 lib/usps_flags/grades/edpro.rb
usps_flags-grades-0.1.2 lib/usps_flags/grades/edpro.rb