Module: Stamina::Dsl::Core

Included in:
Stamina::Dsl
Defined in:
lib/stamina-core/stamina/dsl/core.rb

Instance Method Summary collapse

Instance Method Details

#assert(x, msg = nil) ⇒ Object



5
6
7
8
9
# File 'lib/stamina-core/stamina/dsl/core.rb', line 5

def assert(x, msg = nil)
  raise Stamina::AssertionError,
        "Assertion failed: #{msg || 'no message provided'}",
        caller unless x
end