Sha256: 79105002a92bb288b61486f41e3667f2a7c757e8e540eec51b365190704f7135

Contents?: true

Size: 683 Bytes

Versions: 5

Compression:

Stored size: 683 Bytes

Contents

module Itsf
  module Services
    module V2
      module Message
        class Base
          attr_accessor :service_class, :message, :level, :indent

          def initialize(attributes = {})
            send_attributes(attributes)
          end

          def to_s(format = :default)
            case format
            when :html
            when :default
              "[#{service_class.name} | #{level}]: #{'  ' * indent}#{message}"
            end
          end

          private

          def send_attributes(attributes)
            attributes.each do |name, value|
              send("#{name}=", value)
            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
itsf_services-0.3.1 lib/itsf/services/v2/message/base.rb
itsf_services-0.3.0 lib/itsf/services/v2/message/base.rb
itsf_services-0.2.1 lib/itsf/services/v2/message/base.rb
itsf_services-0.2.0 lib/itsf/services/v2/message/base.rb
itsf_services-0.1.0 lib/itsf/services/v2/message/base.rb