Class: Stoolie::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Result

Client must have the following attributes:

#input
#output

Client must implement the following methods

#analyze(input)
#is_insecure?
#is_spammy?
#is_blacklisted?
#is_offensive?


17
18
19
20
21
# File 'lib/stoolie/result.rb', line 17

def initialize(client)
  @client = client
  @input = client.input
  @ouput = client.output
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



3
4
5
# File 'lib/stoolie/result.rb', line 3

def client
  @client
end

#inputObject

Returns the value of attribute input.



3
4
5
# File 'lib/stoolie/result.rb', line 3

def input
  @input
end

#outputObject

Returns the value of attribute output.



3
4
5
# File 'lib/stoolie/result.rb', line 3

def output
  @output
end

Instance Method Details

#is_blacklisted?Boolean

Public: tells whether the client found blacklisted phrases

Returns a boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/stoolie/result.rb', line 40

def is_blacklisted?
  @client.is_blacklisted?
end

#is_insecure?Boolean

Public: tells whether the client found XSS

Returns a boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/stoolie/result.rb', line 26

def is_insecure?
  @client.is_insecure?
end

#is_offensive?Boolean

Public: tells whether the client found offensive words or phrases

Returns a boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/stoolie/result.rb', line 47

def is_offensive?
  @client.is_offensive?
end

#is_spam?Boolean

Public: tells whether the client found spam

Returns a boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/stoolie/result.rb', line 33

def is_spam?
  @client.is_spam?
end