mirror of
https://github.com/teampoltergeist/poltergeist.git
synced 2022-11-09 12:05:00 -05:00
21 lines
377 B
Ruby
21 lines
377 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'securerandom'
|
|
|
|
module Capybara::Poltergeist
|
|
class Command
|
|
attr_reader :id
|
|
attr_reader :name
|
|
attr_accessor :args
|
|
|
|
def initialize(name, *args)
|
|
@id = SecureRandom.uuid
|
|
@name = name
|
|
@args = args
|
|
end
|
|
|
|
def message
|
|
JSON.dump({ 'id' => @id, 'name' => @name, 'args' => @args })
|
|
end
|
|
end
|
|
end
|