Module: Gnawrnip
- Defined in:
- lib/gnawrnip.rb,
lib/gnawrnip/image.rb,
lib/gnawrnip/version.rb,
lib/gnawrnip/developer.rb,
lib/gnawrnip/screenshot.rb,
lib/gnawrnip/photographer.rb,
lib/gnawrnip/step_screenshot.rb
Defined Under Namespace
Classes: Developer, Image, Photographer, Screenshot, StepScreenshot
Constant Summary
collapse
- VERSION =
'0.7.0'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.make_animation ⇒ Object
- Boolean
-
Whether to make animation GIF
11
12
13
|
# File 'lib/gnawrnip.rb', line 11
def make_animation
@make_animation
end
|
.max_frame_size ⇒ Object
- Integer
-
Maximum size that use to resize of image. If given, it resize the image to fit to this value. Ignored if this value is greater than original width and height.
Example:
original: 640x480
this value: 300
result : 300x225
original: 480x640
this value: 400
result : 300x400
27
28
29
|
# File 'lib/gnawrnip.rb', line 27
def max_frame_size
@max_frame_size
end
|
Class Method Details
.animation? ⇒ Boolean
38
39
40
|
# File 'lib/gnawrnip.rb', line 38
def animation?
make_animation
end
|
29
30
31
|
# File 'lib/gnawrnip.rb', line 29
def configure
yield self
end
|
.frame_interval_ms=(_) ⇒ Object
46
47
48
|
# File 'lib/gnawrnip.rb', line 46
def frame_interval_ms=(_)
warn 'DEPRECATED: `frame_interval_ms` option is deprecated (not used).'
end
|
.photographer ⇒ Object
42
43
44
|
# File 'lib/gnawrnip.rb', line 42
def photographer
@photographer ||= Photographer.new
end
|
.ready! ⇒ Object
33
34
35
36
|
# File 'lib/gnawrnip.rb', line 33
def ready!
require 'gnawrnip/ext/capybara/session' if animation?
require 'gnawrnip/step_screenshot'
end
|