Module: DepShield

Defined in:
lib/dep_shield.rb,
lib/dep_shield/todos.rb,
lib/dep_shield/railtie.rb,
lib/dep_shield/version.rb,
lib/dep_shield/deprecation.rb

Defined Under Namespace

Classes: Deprecation, Error, Railtie, Todos

Constant Summary collapse

VERSION =
"0.3.1"

Class Method Summary collapse

Class Method Details

.raise_or_capture!(name:, message:, callstack: caller) {|scope| ... } ⇒ Event?

Takes a deprecation message string. Warns, then raises or reports to Sentry

Parameters:

  • name (String)
  • message (String)
  • callstack (Array<String>) (defaults to: caller)

Yield Parameters:

  • scope (Scope)

Returns:

  • (Event, nil)


37
38
39
40
41
# File 'lib/dep_shield.rb', line 37

def raise_or_capture!(name:, message:, callstack: caller, **)
  ::DepShield::Deprecation.new(
    name: name, message: message, callstack: callstack
  ).raise_or_capture!
end

.todosObject



26
27
28
# File 'lib/dep_shield.rb', line 26

def todos
  @todos ||= DepShield::Todos.new
end