icalendar/icalendar — pull request #102 by JonMidhir (2014-12-11 12:04:44+00:00)
Title: Issue#85 unexpected alarm creation on events

Proposes a fix for https://github.com/icalendar/icalendar/issues/85.

The `.alarm` method defines an alarm if none exists.

This is the behaviour of all components so a wholesale change to the gem API would be required to change it and I don't see any reason to do that. Instead, this PR implements a `#has_alarm?` method (or `#has_#{component}?` method really) to allow users to check for the presence of an alarm. Includes tests and docs.