Class: Mason::CLI::Stacks

Inherits:
Thor
  • Object
show all
Defined in:
lib/mason/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.is_thor_reserved_word?(word, type) ⇒ Boolean

Returns:

  • (Boolean)


180
181
182
183
# File 'lib/mason/cli.rb', line 180

def is_thor_reserved_word?(word, type)
  return false if word == 'run'
  super
end

Instance Method Details

#create(box) ⇒ Object



190
191
192
193
194
195
# File 'lib/mason/cli.rb', line 190

def create(box)
  name = options[:name] || box
  print "* creating stack #{name}... "
  Mason::Stacks.create(name, box)
  puts "done"
end

#destroy(name) ⇒ Object



199
200
201
202
203
# File 'lib/mason/cli.rb', line 199

def destroy(name)
  print "* destroying stack #{name}... "
  Mason::Stacks.destroy(name)
  puts "done"
end

#down(name) ⇒ Object



215
216
217
218
219
# File 'lib/mason/cli.rb', line 215

def down(name)
  print "* stopping stack #{name}..."
  Mason::Stacks.down(name)
  puts "done"
end

#run(name, *args) ⇒ Object



223
224
225
# File 'lib/mason/cli.rb', line 223

def run(name, *args)
  Mason::Stacks.run(name, args.join(" "))
end

#up(name) ⇒ Object



207
208
209
210
211
# File 'lib/mason/cli.rb', line 207

def up(name)
  print "* booting stack #{name} (this will take a while)..."
  Mason::Stacks.up(name)
  puts "done"
end