Class: Puppeteer::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/device.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, user_agent:, viewport:) ⇒ Device

Returns a new instance of Device.

Parameters:

  • name (String)
  • user_agent (String)
  • viewport (Viewport)


5
6
7
8
9
# File 'lib/puppeteer/device.rb', line 5

def initialize(name:, user_agent:, viewport:)
  @name = name
  @user_agent = user_agent
  @viewport = viewport
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/puppeteer/device.rb', line 11

def name
  @name
end

#user_agentObject (readonly)

Returns the value of attribute user_agent.



11
12
13
# File 'lib/puppeteer/device.rb', line 11

def user_agent
  @user_agent
end

#viewportObject (readonly)

Returns the value of attribute viewport.



11
12
13
# File 'lib/puppeteer/device.rb', line 11

def viewport
  @viewport
end