Class: Metar::Data::StationCode

Inherits:
Base
  • Object
show all
Defined in:
lib/metar/data/station_code.rb

Instance Attribute Summary

Attributes inherited from Base

#raw

Class Method Summary collapse

Methods inherited from Base

#initialize, #value

Constructor Details

This class inherits a constructor from Metar::Data::Base

Class Method Details

.parse(raw) ⇒ Object



6
7
8
# File 'lib/metar/data/station_code.rb', line 6

def self.parse(raw)
  new(raw) if raw =~ /^[A-Z][A-Z0-9]{3}$/
end