Class: DeleteRunner

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/bento/delete.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#banner, #box_metadata, #build_list, #builds_yml, #duration, #info, #macos?, #metadata_files, #private_box?, #unix?, #vc_account, #warn, #windows?

Constructor Details

#initialize(opts) ⇒ DeleteRunner

Returns a new instance of DeleteRunner.



8
9
10
11
# File 'lib/bento/delete.rb', line 8

def initialize(opts)
  @box = opts.box
  @version = opts.version
end

Instance Attribute Details

#boxObject (readonly)

Returns the value of attribute box.



6
7
8
# File 'lib/bento/delete.rb', line 6

def box
  @box
end

#versionObject (readonly)

Returns the value of attribute version.



6
7
8
# File 'lib/bento/delete.rb', line 6

def version
  @version
end

Instance Method Details

#startObject



13
14
15
16
17
18
19
20
21
# File 'lib/bento/delete.rb', line 13

def start
  banner("Starting Delete...")
  time = Benchmark.measure do
    box = .get_box(box)
    version = box.get_version(version)
    version.delete
  end
  banner("Delete finished in #{duration(time.real)}.")
end