Class: VagrantPlugins::DevCommands::Commandfile

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

Overview

Loads and handles the Commandfile

Defined Under Namespace

Classes: Modeler, Reader

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ Commandfile

Returns a new instance of Commandfile.



9
10
11
# File 'lib/vagrant/devcommands/commandfile.rb', line 9

def initialize(env)
  @env = env
end

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/vagrant/devcommands/commandfile.rb', line 13

def exist?
  path != nil
end

#pathObject



17
18
19
# File 'lib/vagrant/devcommands/commandfile.rb', line 17

def path
  find_commandfile
end

#path_globalObject



21
22
23
24
25
26
27
# File 'lib/vagrant/devcommands/commandfile.rb', line 21

def path_global
  global = Pathname.new(Dir.home).join('.vagrant.devcommands')

  return global if global.file?

  nil
end