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.



7
8
9
# File 'lib/vagrant/devcommands/commandfile.rb', line 7

def initialize(env)
  @env = env
end

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/vagrant/devcommands/commandfile.rb', line 11

def exist?
  path != nil
end

#pathObject



15
16
17
# File 'lib/vagrant/devcommands/commandfile.rb', line 15

def path
  find_commandfile
end

#path_globalObject



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

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

  return global if global.file?

  nil
end