Class: Janus::Screenshot
- Inherits:
-
Object
- Object
- Janus::Screenshot
- Defined in:
- lib/janus/screenshot.rb
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
Instance Method Summary collapse
- #dimensions ⇒ Object
-
#initialize(image) ⇒ Screenshot
constructor
A new instance of Screenshot.
- #pixels ⇒ Object
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
#image ⇒ Object (readonly)
Returns the value of attribute image.
3 4 5 |
# File 'lib/janus/screenshot.rb', line 3 def image @image end |
Instance Method Details
#dimensions ⇒ Object
9 10 11 |
# File 'lib/janus/screenshot.rb', line 9 def dimensions { width: @image.width, height: @image.height } end |
#pixels ⇒ Object
13 14 15 |
# File 'lib/janus/screenshot.rb', line 13 def pixels @image.pixels end |