Class: MultiVideoStreaming::Helpers::GetDefaultErrorMessage
- Inherits:
-
Object
- Object
- MultiVideoStreaming::Helpers::GetDefaultErrorMessage
- Defined in:
- lib/multi_video_streaming/helpers/get_default_error_message.rb
Class Method Summary collapse
Class Method Details
.by_method(method:) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/multi_video_streaming/helpers/get_default_error_message.rb', line 6 def self.by_method(method:) methods = { :upload => "upload", :get => "get", :delete => "delete" } current_method = methods[method] if current_method.nil? raise MultiVideoStreaming::Errors::MissingParam.new("method") end "An error occurred when trying to #{current_method} a video." end |
.not_available ⇒ Object
25 26 27 |
# File 'lib/multi_video_streaming/helpers/get_default_error_message.rb', line 25 def self.not_available "The video was successfully found, but it is currently not available." end |
.not_found(video_id:) ⇒ Object
21 22 23 |
# File 'lib/multi_video_streaming/helpers/get_default_error_message.rb', line 21 def self.not_found(video_id:) "The video with id: #{video_id} does not exist." end |