Class: Litterbox::LastBuild

Inherits:
Object
  • Object
show all
Defined in:
lib/litterbox/last_build.rb

Overview

LastBuild class

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#pkg_artifactObject

Returns the value of attribute pkg_artifact.



9
10
11
# File 'lib/litterbox/last_build.rb', line 9

def pkg_artifact
  @pkg_artifact
end

#pkg_blake2bsumObject

Returns the value of attribute pkg_blake2bsum.



11
12
13
# File 'lib/litterbox/last_build.rb', line 11

def pkg_blake2bsum
  @pkg_blake2bsum
end

#pkg_identObject

Returns the value of attribute pkg_ident.



8
9
10
# File 'lib/litterbox/last_build.rb', line 8

def pkg_ident
  @pkg_ident
end

#pkg_nameObject

Returns the value of attribute pkg_name.



5
6
7
# File 'lib/litterbox/last_build.rb', line 5

def pkg_name
  @pkg_name
end

#pkg_originObject

Returns the value of attribute pkg_origin.



4
5
6
# File 'lib/litterbox/last_build.rb', line 4

def pkg_origin
  @pkg_origin
end

#pkg_releaseObject

Returns the value of attribute pkg_release.



7
8
9
# File 'lib/litterbox/last_build.rb', line 7

def pkg_release
  @pkg_release
end

#pkg_sha256sumObject

Returns the value of attribute pkg_sha256sum.



10
11
12
# File 'lib/litterbox/last_build.rb', line 10

def pkg_sha256sum
  @pkg_sha256sum
end

#pkg_versionObject

Returns the value of attribute pkg_version.



6
7
8
# File 'lib/litterbox/last_build.rb', line 6

def pkg_version
  @pkg_version
end

Class Method Details

.parse(file) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/litterbox/last_build.rb', line 13

def self.parse(file)
  build = LastBuild.new
  File.readlines(file).each do |line|
    key, value = line.split('=')
    build.instance_variable_set("@#{key.strip}", value.strip)
  end
  build
end