Class: RCracy::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ Response

Returns a new instance of Response.



7
8
9
10
11
12
# File 'lib/rcracy/response.rb', line 7

def initialize(attrs)

	@error_code = attrs['error']
	@key = attrs['key']

end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



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

def error_code
  @error_code
end

#keyObject (readonly)

Returns the value of attribute key.



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

def key
  @key
end

Instance Method Details

#errors?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/rcracy/response.rb', line 14

def errors?
	return @error_code == 0 ? false : true;
end