Class: Decaptcha::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/decaptcha/response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#balanceObject

Returns the value of attribute balance.



9
10
11
# File 'lib/decaptcha/response.rb', line 9

def balance
  @balance
end

#bannedObject

Returns the value of attribute banned.



10
11
12
# File 'lib/decaptcha/response.rb', line 10

def banned
  @banned
end

#deletedObject

Returns the value of attribute deleted.



8
9
10
# File 'lib/decaptcha/response.rb', line 8

def deleted
  @deleted
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/decaptcha/response.rb', line 3

def id
  @id
end

#invalidObject

Returns the value of attribute invalid.



7
8
9
# File 'lib/decaptcha/response.rb', line 7

def invalid
  @invalid
end

#locationObject

Returns the value of attribute location.



4
5
6
# File 'lib/decaptcha/response.rb', line 4

def location
  @location
end

#statusObject

Returns the value of attribute status.



6
7
8
# File 'lib/decaptcha/response.rb', line 6

def status
  @status
end

#textObject

Returns the value of attribute text.



5
6
7
# File 'lib/decaptcha/response.rb', line 5

def text
  @text
end

Class Method Details

.new_from_location(location) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/decaptcha/response.rb', line 12

def self.new_from_location location
  r = Response.new
  r.location = location
  location =~ /(\d+)\Z/
  r.id = $1
  r
end