Class: Collavre::Comments::CalendarCommand
- Inherits:
-
Object
- Object
- Collavre::Comments::CalendarCommand
- Defined in:
- app/services/collavre/comments/calendar_command.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(comment:, user:, url_helpers: Collavre::Engine.routes.url_helpers) ⇒ CalendarCommand
constructor
A new instance of CalendarCommand.
Constructor Details
#initialize(comment:, user:, url_helpers: Collavre::Engine.routes.url_helpers) ⇒ CalendarCommand
Returns a new instance of CalendarCommand.
4 5 6 7 8 9 |
# File 'app/services/collavre/comments/calendar_command.rb', line 4 def initialize(comment:, user:, url_helpers: Collavre::Engine.routes.url_helpers) @comment = comment @user = user @creative = comment.creative.effective_origin @url_helpers = url_helpers end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/services/collavre/comments/calendar_command.rb', line 11 def call return unless calendar_command? create_event rescue StandardError => e Rails.logger.error("Calendar command failed: #{e.}") e. end |