Class: Cleantalk

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

Defined Under Namespace

Classes: CheckMessage, CheckMessageResult, CheckNewuser, CheckNewuserResult, Request, Result

Constant Summary collapse

@@auth_key =
nil

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.auth_keyObject



24
25
26
# File 'lib/cleantalk.rb', line 24

def self.auth_key
  @@auth_key
end

.auth_key=(value) ⇒ Object



28
29
30
# File 'lib/cleantalk.rb', line 28

def self.auth_key= value
  @@auth_key = value
end

Instance Method Details

#is_allowed_message(request) ⇒ Object

Function checks whether it is possible to publish the message

Parameters:

  • CleantalkRequest

    $request

Returns:

  • type



7
8
9
10
# File 'lib/cleantalk.rb', line 7

def is_allowed_message(request)
  request.method_name = 'check_message'
  return request.http_request
end

#is_allowed_user(request) ⇒ Object

Function checks whether it is possible to publish the message

Parameters:

  • CleantalkRequest

    $request

Returns:

  • type



17
18
19
20
# File 'lib/cleantalk.rb', line 17

def is_allowed_user(request)
  request.method_name = 'check_newuser'
  return request.http_request
end