Sha256: a375d79376509d6552c13e6527ff37bbb91c6431778b790ee1c8390058952533
Contents?: true
Size: 466 Bytes
Versions: 3
Compression:
Stored size: 466 Bytes
Contents
module Biggs class Format attr_reader :country_name, :iso_code, :format_string def initialize(iso_code) @iso_code = iso_code.to_s.downcase @country_name = Biggs.country_names[@iso_code] @format_string = Biggs.formats[@iso_code] end class << self def find(iso_code) entries_cache[iso_code] ||= new(iso_code) end private def entries_cache @entries_cache ||= {} end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
biggs-0.4.0 | lib/biggs/format.rb |
biggs-0.3.3 | lib/biggs/format.rb |
biggs-0.3.2 | lib/biggs/format.rb |