Class: Pbmenv::UseVersionService

Inherits:
Object
  • Object
show all
Defined in:
lib/pbmenv/services/use_version_service.rb

Defined Under Namespace

Classes: VersionNotFoundError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version:) ⇒ UseVersionService

Returns a new instance of UseVersionService.



9
10
11
# File 'lib/pbmenv/services/use_version_service.rb', line 9

def initialize(version: )
  self.version = version
end

Instance Attribute Details

#versionObject

Returns the value of attribute version.



7
8
9
# File 'lib/pbmenv/services/use_version_service.rb', line 7

def version
  @version
end

Instance Method Details

#execute!Object



13
14
15
16
# File 'lib/pbmenv/services/use_version_service.rb', line 13

def execute!
  throw_error_if_has_not_version
  relink_current_path
end