class Playwright::DSL::ActorDSL
Defines an actor in a stage. The block is only evaluated once when the method is called the first time.
class ExampleStage < Playwright::Stage actors do actor(:actor_name) { User.first! } end end
Attributes
actors[R]
Public Class Methods
new()
click to toggle source
# File lib/playwright/dsl/actor_dsl.rb, line 16 def initialize @actors = ::ActiveSupport::HashWithIndifferentAccess.new end
Public Instance Methods
actor(name, &block)
click to toggle source
# File lib/playwright/dsl/actor_dsl.rb, line 26 def actor(name, &block) @actors[name] = block end