Class: Ruboty::Replica::Actions::Replica

Inherits:
Actions::Base
  • Object
show all
Defined in:
lib/ruboty/replica/actions/replica.rb

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/ruboty/replica/actions/replica.rb', line 5

def call
  replica = replicate!
  message.reply("replica: replicated #{message.robot.name} to #{replica['name']}")
  message.reply("replica: #{replica['git_url']}")

  if message[:new_owner]
    transfer!(replica, message[:new_owner])
  end
rescue => e
  message.reply("replica: failed, #{e.message}")
end