Class: Stf::AddAdbPublicKeyInteractor
- Inherits:
-
Object
- Object
- Stf::AddAdbPublicKeyInteractor
- Includes:
- Log
- Defined in:
- lib/stf/interactor/add_adb_public_key.rb
Instance Method Summary collapse
Methods included from Log
Instance Method Details
#execute(adb_public_key_location) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/stf/interactor/add_adb_public_key.rb', line 10 def execute(adb_public_key_location) public_key = File.open(adb_public_key_location, 'rb', &:read) success = DI[:stf].add_adb_public_key public_key if success logger.info "adb public key from '#{adb_public_key_location}' has been added" elsif logger.error "Can't add public key from '#{adb_public_key_location}'" return false end end |