Class: HashiCorp::VagrantVMwareworkstation::Action::MessageSnapshotNotCreated

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-multiprovider-snap/providers/vmware_workstation/action/message_snapshot_not_created.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ MessageSnapshotNotCreated

Returns a new instance of MessageSnapshotNotCreated.



9
10
11
# File 'lib/vagrant-multiprovider-snap/providers/vmware_workstation/action/message_snapshot_not_created.rb', line 9

def initialize(app, env)
    @app = app
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/vagrant-multiprovider-snap/providers/vmware_workstation/action/message_snapshot_not_created.rb', line 13

def call(env)

    if env[:snap_name].nil?
        env[:ui].info I18n.t("vagrant_snap.actions.vm.snapshot_not_created.not_created")
    else
        env[:ui].info(I18n.t("vagrant_snap.actions.vm.snapshot_not_created.named_not_exist",
            :snapshot => env[:snap_name]),
        )
    end

    @app.call(env)

end