Method: VagrantPlugins::ProviderLocal::Provider#action

Defined in:
lib/vagrant-local/provider.rb

#action(name) ⇒ Object

This should return an action callable for the given name.

Parameters:

  • name (Symbol)

    Name of the action.

Returns:

  • (Object)

    A callable action sequence object, whether it is a proc, object, etc.


46
47
48
49
50
51
52
53
54
# File 'lib/vagrant-local/provider.rb', line 46

def action(name)
  # Attempt to get the action method from the Action class if it
  # exists, otherwise return nil to show that we don't support the
  # given action
  action_method = "action_#{name}"
  return Action.send(action_method) if Action.respond_to?(action_method)

  nil
end