Class: Xdotool::PositionParser
- Inherits:
-
Object
- Object
- Xdotool::PositionParser
- Defined in:
- lib/xdotool/position_parser.rb
Overview
coordinate position parser from Xdotool
Class Method Summary collapse
-
.parse(position) ⇒ Object
:nodoc: all.
Class Method Details
.parse(position) ⇒ Object
:nodoc: all
6 7 8 9 10 11 12 13 |
# File 'lib/xdotool/position_parser.rb', line 6 def self.parse(position) hash_position = position.scan(/(\w+):(\d+)/).to_h { x: hash_position['x'].to_i, y: hash_position['y'].to_i } end |