class Gorsse::Command

Public Class Methods

new(command) click to toggle source
# File lib/gorsse/command.rb, line 5
def initialize(command)
  @command = JSON.parse(command)
end

Public Instance Methods

run!() click to toggle source
# File lib/gorsse/command.rb, line 9
def run!
  protocol_class = Object.const_get(@command['Protocol'])
  protocol = protocol_class.new(@command['Scope'])
  client = Client.new(@command['Client'])
  protocol.__send__(@command['Callback'], client)
end