Class: Footman::Package::Deb

Inherits:
Base
  • Object
show all
Defined in:
lib/footman/package/deb.rb

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ Deb

Returns a new instance of Deb.



5
6
7
8
9
10
11
12
# File 'lib/footman/package/deb.rb', line 5

def initialize(file)
  super file

  file.match(/.*\/(?<built_on>[a-z]+)\/(?<name>[^_]+)[_|-](?<version>[^_]+)[_|-](?<arch>[^\.]+)\.(?<extname>\S+)\z/i) do |match|
    @built_on = match[:built_on]
    @name     = match[:name]
  end
end

Instance Method Details

#processObject



14
15
16
17
# File 'lib/footman/package/deb.rb', line 14

def process
  add_package
  cleanup
end