Class: Pbmenv::VersionObject

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

Instance Method Summary collapse

Constructor Details

#initialize(version_name:, is_latest:, is_current:) ⇒ VersionObject

Returns a new instance of VersionObject.

Parameters:

  • version_name (String)
  • is_latest (Boolean)
  • is_current (Boolean)


6
7
8
9
10
# File 'lib/pbmenv/version_object.rb', line 6

def initialize(version_name: , is_latest: , is_current: )
  @version_name = version_name
  @is_latest = is_latest
  @is_current = is_current
end

Instance Method Details

#current_version?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/pbmenv/version_object.rb', line 23

def current_version?
  @is_current
end

#latest_version?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/pbmenv/version_object.rb', line 28

def latest_version?
  @is_latest
end

#nameObject

alias



18
19
20
# File 'lib/pbmenv/version_object.rb', line 18

def name
  version_name
end

#version_nameString

Returns:

  • (String)


13
14
15
# File 'lib/pbmenv/version_object.rb', line 13

def version_name
  @version_name
end