class Itsf::Services::V2::Message::Base

Attributes

indent[RW]
level[RW]
message[RW]
service_class[RW]

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/itsf/services/v2/message/base.rb, line 8
def initialize(attributes = {})
  send_attributes(attributes)
end

Public Instance Methods

to_s(format = :default) click to toggle source
# File lib/itsf/services/v2/message/base.rb, line 12
def to_s(format = :default)
  case format
  when :html
  when :default
    "[#{service_class.name} | #{level}]: #{'  ' * indent}#{message}"
  end
end

Private Instance Methods

send_attributes(attributes) click to toggle source
# File lib/itsf/services/v2/message/base.rb, line 22
def send_attributes(attributes)
  attributes.each do |name, value|
    send("#{name}=", value)
  end
end