Class: Prevoty::FilterStatistics

Inherits:
Object
  • Object
show all
Defined in:
lib/prevoty/responses/filter_statistics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ FilterStatistics

Returns a new instance of FilterStatistics.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/prevoty/responses/filter_statistics.rb', line 9

def initialize(data)
  @bytes = data["bytes"]
  @invalid_attributes = data["invalid_attributes"]
  @invalid_protocols = data["invalid_protocols"]
  @invalid_tags = data["invalid_tags"]
  @blacklisted_phrases = data["blacklisted_phrases"]
  @flagged_phrases = data["flagged_phrases"]
  @javascript_attributes = data["javascript_attributes"]
  @javascript_protocols = data["javascript_protocols"]
  @javascript_tags = data["javascript_tags"]
  @prevoty_profanity_features = data["prevoty_profanity_features"]
  @prevoty_spam_features = data["prevoty_spam_features"]
  @tags_balanced = data["tags_balanced"]
  @transformations = data["transformations"]
end

Instance Attribute Details

#blacklisted_phrasesObject (readonly)

Returns the value of attribute blacklisted_phrases.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def blacklisted_phrases
  @blacklisted_phrases
end

#bytesObject (readonly)

Returns the value of attribute bytes.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def bytes
  @bytes
end

#flagged_phrasesObject (readonly)

Returns the value of attribute flagged_phrases.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def flagged_phrases
  @flagged_phrases
end

#invalid_attributesObject (readonly)

Returns the value of attribute invalid_attributes.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def invalid_attributes
  @invalid_attributes
end

#invalid_protocolsObject (readonly)

Returns the value of attribute invalid_protocols.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def invalid_protocols
  @invalid_protocols
end

#invalid_tagsObject (readonly)

Returns the value of attribute invalid_tags.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def invalid_tags
  @invalid_tags
end

#javascript_attributesObject (readonly)

Returns the value of attribute javascript_attributes.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def javascript_attributes
  @javascript_attributes
end

#javascript_protocolsObject (readonly)

Returns the value of attribute javascript_protocols.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def javascript_protocols
  @javascript_protocols
end

#javascript_tagsObject (readonly)

Returns the value of attribute javascript_tags.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def javascript_tags
  @javascript_tags
end

#prevoty_profanity_featuresObject (readonly)

Returns the value of attribute prevoty_profanity_features.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def prevoty_profanity_features
  @prevoty_profanity_features
end

#prevoty_spam_featuresObject (readonly)

Returns the value of attribute prevoty_spam_features.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def prevoty_spam_features
  @prevoty_spam_features
end

#tags_balancedObject (readonly)

Returns the value of attribute tags_balanced.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def tags_balanced
  @tags_balanced
end

#transformationsObject (readonly)

Returns the value of attribute transformations.



3
4
5
# File 'lib/prevoty/responses/filter_statistics.rb', line 3

def transformations
  @transformations
end

Instance Method Details

#is_significant?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/prevoty/responses/filter_statistics.rb', line 25

def is_significant?
  return @transformations > 0
end