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.



4
5
6
# File 'lib/playwright/javascript/value_serializer.rb', line 4

def initialize(ruby_value)
  @value = ruby_value
end

Instance Method Details

#serializeHash

Returns:

  • (Hash)


9
10
11
12
# File 'lib/playwright/javascript/value_serializer.rb', line 9

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