Class: VagrantPlugins::DevCommands::Commandfile::Modeler

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/devcommands/commandfile/modeler.rb

Overview

Converts a (commandfile) entry into a model instance

Instance Method Summary collapse

Instance Method Details

#model(spec) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/vagrant/devcommands/commandfile/modeler.rb', line 8

def model(spec)
  case spec[:type]
  when :chain
    chain(spec[:name], spec[:options])
  when :command
    command(spec[:name], spec[:options])
  when :command_alias
    command_alias(spec[:name], spec[:options])
  end
end