Class: DeathByCaptcha::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/deathbycaptcha/models.rb

Overview

Base class of a model object returned by DeathByCaptcha API.

Direct Known Subclasses

Captcha, ServerStatus, User

Instance Method Summary collapse

Constructor Details

#initialize(values = {}) ⇒ Model

Returns a new instance of Model.


6
7
8
9
10
# File 'lib/deathbycaptcha/models.rb', line 6

def initialize(values = {})
  values.each do |key, value|
    self.send("#{key}=", value) if self.respond_to?("#{key}=")
  end
end