module Raven::Mixin::InitializeWith

Overview

Maps passed attributes to @ivar_variables and self.property_setters=.

class Foo
  include Raven::Mixin::InitializeWith

  @logger : String?
  property message : String?

  def backtrace=(backtrace)
    # ...
  end
end

foo = Foo.new
foo.initialize_with({
  logger:    "my-logger",
  message:   "boo!",
  backtrace: caller,
})

NOTE Magic inside!

Direct including types

Defined in:

raven/mixins/initialize_with.cr

Instance Method Summary

Instance Method Detail

def initialize_with(attributes) #

[View source]
def initialize_with(**attributes) #

[View source]