Class: VagrantPlugins::DevCommands::Model::Chain

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/devcommands/model/chain.rb

Overview

Definition of an executable command chain

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spec) ⇒ Chain

Returns a new instance of Chain.



10
11
12
13
14
15
16
17
18
19
# File 'lib/vagrant/devcommands/model/chain.rb', line 10

def initialize(spec)
  @name     = spec[:name]
  @commands = spec[:commands]

  @desc  = spec[:desc]
  @help  = spec[:help]
  @usage = spec[:usage]

  @break_on_error = spec[:break_on_error] != false
end

Instance Attribute Details

#commandsObject (readonly)

Returns the value of attribute commands.



8
9
10
# File 'lib/vagrant/devcommands/model/chain.rb', line 8

def commands
  @commands
end

#descObject (readonly)

Returns the value of attribute desc.



8
9
10
# File 'lib/vagrant/devcommands/model/chain.rb', line 8

def desc
  @desc
end

#helpObject (readonly)

Returns the value of attribute help.



8
9
10
# File 'lib/vagrant/devcommands/model/chain.rb', line 8

def help
  @help
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/vagrant/devcommands/model/chain.rb', line 8

def name
  @name
end

#usageObject (readonly)

Returns the value of attribute usage.



8
9
10
# File 'lib/vagrant/devcommands/model/chain.rb', line 8

def usage
  @usage
end

Instance Method Details

#break_on_error?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/vagrant/devcommands/model/chain.rb', line 21

def break_on_error?
  @break_on_error
end