Class: Janus::Screenshot

Inherits:
Object
  • Object
show all
Defined in:
lib/janus/screenshot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image) ⇒ Screenshot

Returns a new instance of Screenshot.



5
6
7
# File 'lib/janus/screenshot.rb', line 5

def initialize(image)
  @image = image
end

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image.



3
4
5
# File 'lib/janus/screenshot.rb', line 3

def image
  @image
end

Instance Method Details

#dimensionsObject



9
10
11
# File 'lib/janus/screenshot.rb', line 9

def dimensions
  { width: @image.width, height: @image.height }
end

#pixelsObject



13
14
15
# File 'lib/janus/screenshot.rb', line 13

def pixels
  @image.pixels
end