# encoding: utf-8 module ServiceObjects # Describes messages to be returned by service objects class Message # @!scope class # @!method new(type, text) # Creates the immutable message with type and text # # @param [#to_sym] type # @param [#to_s] text # # @return [ServiceObjects::Message] # @private def initialize(type, text) @type = type.to_sym @text = text.to_s.freeze freeze end # @!attribute [r] text # The text of the message # @return [String] attr_reader :text # @!attribute [r] type # The type of the message # @return [Symbol] attr_reader :type end # class Message end # module ServiceObjects