Class: AuthManager::Updater

Inherits:
Constants show all
Defined in:
lib/auth_manager.rb,
lib/auth_manager/updater/updater.rb

Constant Summary

Constants inherited from Constants

Constants::APPS, Constants::USERS

Class Method Summary collapse

Class Method Details

.update(old_obj, new_obj, option) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/auth_manager/updater/updater.rb', line 7

def self.update(old_obj, new_obj, option)
  updated = false
  if AuthManager::Finder.find_object?(old_obj, option)
    if p AuthManager::Adder.save?(new_obj, option)
      updated = delete_obj?(old_obj, option)
    end
  end
  updated
end