Sha256: 476f3c4970743961e815dffd7a8aa7380224248398e30f95551a90d77265b156

Contents?: true

Size: 377 Bytes

Versions: 5

Compression:

Stored size: 377 Bytes

Contents

# 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

Version data entries

5 entries across 4 versions & 2 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/poltergeist-1.18.1/lib/capybara/poltergeist/command.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/poltergeist-1.18.1/lib/capybara/poltergeist/command.rb
poltergeist-1.18.1 lib/capybara/poltergeist/command.rb
poltergeist-1.18.0 lib/capybara/poltergeist/command.rb
poltergeist-1.17.0 lib/capybara/poltergeist/command.rb