lib/usps_flags/generate/flag.rb in usps_flags-0.3.23 vs lib/usps_flags/generate/flag.rb in usps_flags-0.3.24

- old
+ new

@@ -41,15 +41,10 @@ end def pennant(type: "CRUISE", outfile: nil, scale: nil) type = type.upcase svg = "" - title = case type - when "CRUISE" - "Cruise Pennant" - when "OIC" - "Officer-in-Charge Pennant" - end + title = { "CRUISE" => "Cruise Pennant", "OIC" => "Officer-in-Charge Pennant" }[type] svg << USPSFlags::Core.headers(pennant: true, scale: scale, title: title) svg << USPSFlags::Core.pennant(type) svg << USPSFlags::Core.footer USPSFlags::Helpers.output(svg, outfile: outfile)