Class: Applitools::Calabash::CalabashScreenshotProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/applitools/calabash/calabash_screenshot_provider.rb

Constant Summary collapse

WAIT_BEFORE_SCREENSHOT =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_options = {}) ⇒ CalabashScreenshotProvider

Returns a new instance of CalabashScreenshotProvider.



9
10
11
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 9

def initialize(_options = {})
  @density = 1
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



7
8
9
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 7

def context
  @context
end

#debug_screenshot_providerObject (readonly)

Returns the value of attribute debug_screenshot_provider.



7
8
9
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 7

def debug_screenshot_provider
  @debug_screenshot_provider
end

#densityObject (readonly)

Returns the value of attribute density.



7
8
9
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 7

def density
  @density
end

Instance Method Details

#using_context(value) ⇒ Object



18
19
20
21
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 18

def using_context(value)
  @context = value
  self
end

#with_debug_screenshot_provider(value) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 23

def with_debug_screenshot_provider(value)
  Applitools::ArgumentGuard.is_a?(
    value,
    'debug_screenshot_provider',
    Applitools::DebugScreenshotProvider
  )
  @debug_screenshot_provider = value
  self
end

#with_density(value) ⇒ Object



13
14
15
16
# File 'lib/applitools/calabash/calabash_screenshot_provider.rb', line 13

def with_density(value)
  @density = value
  self
end