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)


185
186
187
188
# File 'lib/mason/cli.rb', line 185

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

Instance Method Details

#create(box) ⇒ Object



195
196
197
198
199
200
# File 'lib/mason/cli.rb', line 195

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

#destroy(name) ⇒ Object



204
205
206
207
208
# File 'lib/mason/cli.rb', line 204

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

#down(name) ⇒ Object



220
221
222
223
224
# File 'lib/mason/cli.rb', line 220

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

#run(name, *args) ⇒ Object



228
229
230
# File 'lib/mason/cli.rb', line 228

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

#up(name) ⇒ Object



212
213
214
215
216
# File 'lib/mason/cli.rb', line 212

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