patchwork

an assorted collection of randomness and non-essential remarks
Have at least one original repos where PHP is the dominant language The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos Fork and commit to someone's open source project in need Have a project valued enough to be forked by someone else Have at least three original repos where Ruby is the dominant language Have at least one original repo where Ruby is the dominant language Have at least one original repo where some form of shell script is the dominant language
Endorse tarakanbg on Coderwall Powered by Obtvse

notams gem updated

Update released for the notams gem, completely refactoring the code into classes for flexibility and adding customization options.

The .notams method can now be customized by passing an optional hash of arguments.

The :objects => true option will cause the .notams method to return an array of notam objects instead of strings. Thus each notam is parsed and encapuslated in an instance of the Notam class and exposes a number of attributes:

icao = "lqsa"
icao.notams(:objects => true) # => returns an array of notam objects

notam = icao.notams.first # => returns the first notam as an object

# Notam object attributes

notam.raw       # => returns the raw (unprocessed) notam as a string
notam.icao      # => returns the icao code of the airport or area, covered by the notam;
                #    useful when iterating over multiple notams, covering a collection of airports or areas
notam.message   # => returns the actual information message of the notam as a string
Back to Blog