Class: Prevoty::FilterStatistics
- Inherits:
-
Object
- Object
- Prevoty::FilterStatistics
- Defined in:
- lib/prevoty/responses/filter_statistics.rb
Instance Attribute Summary collapse
-
#blacklisted_phrases ⇒ Object
readonly
Returns the value of attribute blacklisted_phrases.
-
#bytes ⇒ Object
readonly
Returns the value of attribute bytes.
-
#flagged_phrases ⇒ Object
readonly
Returns the value of attribute flagged_phrases.
-
#invalid_attributes ⇒ Object
readonly
Returns the value of attribute invalid_attributes.
-
#invalid_protocols ⇒ Object
readonly
Returns the value of attribute invalid_protocols.
-
#invalid_tags ⇒ Object
readonly
Returns the value of attribute invalid_tags.
-
#javascript_attributes ⇒ Object
readonly
Returns the value of attribute javascript_attributes.
-
#javascript_protocols ⇒ Object
readonly
Returns the value of attribute javascript_protocols.
-
#javascript_tags ⇒ Object
readonly
Returns the value of attribute javascript_tags.
-
#prevoty_profanity_features ⇒ Object
readonly
Returns the value of attribute prevoty_profanity_features.
-
#prevoty_spam_features ⇒ Object
readonly
Returns the value of attribute prevoty_spam_features.
-
#tags_balanced ⇒ Object
readonly
Returns the value of attribute tags_balanced.
-
#transformations ⇒ Object
readonly
Returns the value of attribute transformations.
Instance Method Summary collapse
-
#initialize(data) ⇒ FilterStatistics
constructor
A new instance of FilterStatistics.
- #is_significant? ⇒ Boolean
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_phrases ⇒ Object (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 |
#bytes ⇒ Object (readonly)
Returns the value of attribute bytes.
3 4 5 |
# File 'lib/prevoty/responses/filter_statistics.rb', line 3 def bytes @bytes end |
#flagged_phrases ⇒ Object (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_attributes ⇒ Object (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_protocols ⇒ Object (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_tags ⇒ Object (readonly)
Returns the value of attribute invalid_tags.
3 4 5 |
# File 'lib/prevoty/responses/filter_statistics.rb', line 3 def @invalid_tags end |
#javascript_attributes ⇒ Object (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_protocols ⇒ Object (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_tags ⇒ Object (readonly)
Returns the value of attribute javascript_tags.
3 4 5 |
# File 'lib/prevoty/responses/filter_statistics.rb', line 3 def @javascript_tags end |
#prevoty_profanity_features ⇒ Object (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_features ⇒ Object (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_balanced ⇒ Object (readonly)
Returns the value of attribute tags_balanced.
3 4 5 |
# File 'lib/prevoty/responses/filter_statistics.rb', line 3 def @tags_balanced end |
#transformations ⇒ Object (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
25 26 27 |
# File 'lib/prevoty/responses/filter_statistics.rb', line 25 def is_significant? return @transformations > 0 end |