Class: UserInteractor
- Inherits:
-
Object
- Object
- UserInteractor
- Includes:
- Log
- Defined in:
- lib/stf/interactor/user_interactor.rb
Instance Method Summary collapse
- #execute(adb_public_key_location) ⇒ Object
-
#initialize(stf) ⇒ UserInteractor
constructor
A new instance of UserInteractor.
Methods included from Log
Constructor Details
#initialize(stf) ⇒ UserInteractor
Returns a new instance of UserInteractor.
10 11 12 |
# File 'lib/stf/interactor/user_interactor.rb', line 10 def initialize(stf) @stf = stf end |
Instance Method Details
#execute(adb_public_key_location) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/stf/interactor/user_interactor.rb', line 14 def execute(adb_public_key_location) public_key = File.open(adb_public_key_location, 'rb', &:read) success = @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 |