rossta / montrose

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

adding a custom label to rule #146

Closed flyingboy007 closed 7 months ago

flyingboy007 commented 3 years ago

Is it possible to add a custom text field to a rule like below?

Montrose.r(every: :week, on: [:monday, :wednesday], text: 'custom_label') This throws an error. Is there any other way to do this?

rossta commented 8 months ago

There is not currently a way to do this. What is the use case?

What about composing this behavior instead? e.g. events.map { |e| { timestamp: e, text: 'custom_label' }