Class: Playwright::JavaScript::ValueSerializer

Inherits:
Object
  • Object
show all
Defined in:
lib/playwright/javascript/value_serializer.rb

Instance Method Summary collapse

Constructor Details

#initialize(ruby_value) ⇒ ValueSerializer

Returns a new instance of ValueSerializer.



7
8
9
10
# File 'lib/playwright/javascript/value_serializer.rb', line 7

def initialize(ruby_value)
  @value = ruby_value
  @visited = VisitorInfo.new
end

Instance Method Details

#serializeHash

Returns:

  • (Hash)


13
14
15
16
# File 'lib/playwright/javascript/value_serializer.rb', line 13

def serialize
  @handles = []
  { value: serialize_value(@value), handles: @handles }
end