Class: Pkgman::Target

Inherits:
Object
  • Object
show all
Defined in:
lib/pkgman/target.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runtime, target) ⇒ Target

Returns a new instance of Target.



8
9
10
11
12
13
14
# File 'lib/pkgman/target.rb', line 8

def initialize(runtime, target)
  @target = target
  case @target['image']
    when 'centos'
      @driver = Targets::Centos.new(runtime, target)
  end
end

Instance Attribute Details

#targetObject (readonly)

Returns the value of attribute target.



6
7
8
# File 'lib/pkgman/target.rb', line 6

def target
  @target
end

Instance Method Details

#destroyObject



24
25
26
# File 'lib/pkgman/target.rb', line 24

def destroy
  @driver.container.destroy
end

#download(*args, &block) ⇒ Object



20
21
22
# File 'lib/pkgman/target.rb', line 20

def download(*args, &block)
  @driver.container.download(*args, &block)
end

#execute(*args, &block) ⇒ Object



16
17
18
# File 'lib/pkgman/target.rb', line 16

def execute(*args, &block)
  @driver.container.execute(*args, &block)
end