rossta / montrose

Recurring events library for Ruby. Enumerable recurrence objects and convenient chainable interface.
https://rossta.net/montrose/
MIT License
843 stars 53 forks source link

Better error message for passing unsupported option #17

Closed rossta closed 5 years ago

rossta commented 8 years ago

Raise a custom error with info instead of the following:

Montrose::Recurrence.new(every: :week, foo: :bar)
NoMethodError: undefined method `foo' for #<Montrose::Options:0x007ff37e52e3c8>
from /Users/ross/dev/rossta/montrose/lib/montrose/options.rb:103:in `[]'