Method: Assert::ContextInfo#initialize
- Defined in:
- lib/assert/context_info.rb
#initialize(klass, called_from = nil, first_caller = nil) ⇒ ContextInfo
Returns a new instance of ContextInfo.
7 8 9 10 11 |
# File 'lib/assert/context_info.rb', line 7 def initialize(klass, called_from = nil, first_caller = nil) @called_from = called_from || first_caller @klass = klass @file = @called_from.to_s.gsub(/\:[0-9]+.*$/, "") if @called_from end |