Sha256: 41a0d71566eb98391eac8a15982b1a3996427d8581b8e8fcacd315e05617b064
Contents?: true
Size: 349 Bytes
Versions: 11
Compression:
Stored size: 349 Bytes
Contents
module TwoCaptcha # Model of a Captcha returned by ZeroCaptcha API. # class Captcha < TwoCaptcha::Model attr_accessor :id, :text, :api_response def indexes text.gsub('click:', '').split(/[^0-9]/).map(&:to_i) end def coordinates text.scan(/x=([0-9]+),y=([0-9]+)/).map { |x, y| [x.to_i, y.to_i] } end end end
Version data entries
11 entries across 11 versions & 1 rubygems