Class: RecordLoader::RobotLoader

Inherits:
ApplicationRecordLoader show all
Defined in:
lib/record_loader/robot_loader.rb

Overview

Creates the specified robots if they are not present

Instance Method Summary collapse

Instance Method Details

#create_or_update!(name, options) ⇒ Object


11
12
13
# File 'lib/record_loader/robot_loader.rb', line 11

def create_or_update!(name, options)
  Robot.create_with(options).find_or_create_by!(name: name)
end