# File lib/pickle/session.rb, line 71 def created_model(name) factory, name_or_index = *parse_model(name) if name_or_index.blank? models_by_index(factory).last elsif name_or_index.is_a?(Integer) models_by_index(factory)[name_or_index] else models_by_name(factory)[name_or_index] or raise "Can't find pickle model: '#{name}' in this scenario" end end