Class: Checker
- Inherits:
-
Object
- Object
- Checker
- Defined in:
- lib/burnspam/point_tracker.rb
Overview
Checker calls the methods of the strategies and holds the results in accessible instance variables. The results are either Integer or Boolean
- Version
-
0.1.1
- Date
-
2011/12/18
- @author
-
Brian Burns, x10205284
- @reference
Instance Attribute Summary collapse
-
#count_urls ⇒ Object
readonly
Returns the value of attribute count_urls.
-
#duplicate ⇒ Object
readonly
Returns the value of attribute duplicate.
-
#keyword_count ⇒ Object
readonly
Returns the value of attribute keyword_count.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#starts_with ⇒ Object
readonly
Returns the value of attribute starts_with.
-
#test ⇒ Object
readonly
Returns the value of attribute test.
-
#url_length ⇒ Object
readonly
Returns the value of attribute url_length.
Instance Method Summary collapse
-
#initialize(strategy) ⇒ Checker
constructor
A new instance of Checker.
Constructor Details
#initialize(strategy) ⇒ Checker
Returns a new instance of Checker.
108 109 110 111 112 113 114 115 116 |
# File 'lib/burnspam/point_tracker.rb', line 108 def initialize(strategy) @count_urls = strategy.count_urls @url_length = strategy.url_length @length = strategy.length @starts_with = strategy.starts_with? @duplicate = strategy.duplicate? @test = strategy.test @keyword_count = strategy.keywords end |
Instance Attribute Details
#count_urls ⇒ Object (readonly)
Returns the value of attribute count_urls.
105 106 107 |
# File 'lib/burnspam/point_tracker.rb', line 105 def count_urls @count_urls end |
#duplicate ⇒ Object (readonly)
Returns the value of attribute duplicate.
105 106 107 |
# File 'lib/burnspam/point_tracker.rb', line 105 def duplicate @duplicate end |
#keyword_count ⇒ Object (readonly)
Returns the value of attribute keyword_count.
105 106 107 |
# File 'lib/burnspam/point_tracker.rb', line 105 def keyword_count @keyword_count end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
105 106 107 |
# File 'lib/burnspam/point_tracker.rb', line 105 def length @length end |
#starts_with ⇒ Object (readonly)
Returns the value of attribute starts_with.
105 106 107 |
# File 'lib/burnspam/point_tracker.rb', line 105 def starts_with @starts_with end |
#test ⇒ Object (readonly)
Returns the value of attribute test.
105 106 107 |
# File 'lib/burnspam/point_tracker.rb', line 105 def test @test end |
#url_length ⇒ Object (readonly)
Returns the value of attribute url_length.
105 106 107 |
# File 'lib/burnspam/point_tracker.rb', line 105 def url_length @url_length end |