Method: Webbynode::Commands::Start#execute

Defined in:
lib/webbynode/commands/start.rb

#executeObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/webbynode/commands/start.rb', line 8

def execute
  exit if no?("Are you sure you wish to start your webby? (y/n)")
  
  api.webbies.each do |webby|
    if webby[1][:ip].eql?(git.parse_remote_ip)
      unless webby[1][:status].eql?("on")
        puts "#{webby[0]} is starting up!"
        api.post("/webby/#{webby[1][:name]}/start")
      else
        puts "#{webby[0]} is already started up."
      end
    end
  end
end