lib/rrj/errors/janus/responses/admin.rb in ruby_rabbitmq_janus-3.0.0.pre.336 vs lib/rrj/errors/janus/responses/admin.rb in ruby_rabbitmq_janus-3.0.0.pre.351

- old
+ new

@@ -1,37 +1,81 @@ # frozen_string_literal: true -# @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv> - module RubyRabbitmqJanus module Errors module Janus - # Define a super class for all error in Janus::Responses::ResponseAdmin - class BaseResponseAdmin < RubyRabbitmqJanus::Errors::Janus::BaseResponse - def initialize(message) - super "[Admin] #{message}" - end - end + module Responses + module Admin + class Base < RubyRabbitmqJanus::Errors::Janus::Responses::Base + def initialize(message) + super 'Admin', message + end + end - module ResponseAdmin - # Error for Janus::Responses::ResponseAdmin#sessions - class Sessions < RubyRabbitmqJanus::Errors::Janus::BaseResponseAdmin - def initializer - super 'Error sessions information reading' + class Sessions < Base + def initialize + super "Missing key 'sessions'" + end end - end - # Error for Janus::Responses::ResponseAdmin#handles - class Handles < RubyRabbitmqJanus::Errors::Janus::BaseResponseAdmin - def initializer - super 'Error handles information reading' + class Handles < Base + def initialize + super "Missing key 'handles'" + end end - end - # Error for Janus::Responses::ResponseAdmin#info - class Info < RubyRabbitmqJanus::Errors::Janus::BaseResponseAdmin - def initializer - super 'Error info information reading' + class Info < Base + def initialize + super "Missing key 'info'" + end + end + + class LibniceDebug < Base + def initialize + super "Missing key 'libnice_debug'" + end + end + + class LockingDebug < Base + def initialize + super "Missing key 'locking_debug'" + end + end + + class LogColors < Base + def initialize + super "Missing key 'log_color'" + end + end + + class Level < Base + def initialize + super "Missing key 'log_level'" + end + end + + class LogTimestamps < Base + def initialize + super "Missing key 'log_timestamps'" + end + end + + class MaxNackQueue < Base + def initialize + super "Missing key 'max_nack_queue'" + end + end + + class NoMediaTimer < Base + def initialize + super "Missing key 'no_media_timer'" + end + end + + class Timeout < Base + def initialize + super "Missing key 'session_timeout'" + end end end end end end