Class: Watchr::SmellsCollector
- Inherits:
-
Object
- Object
- Watchr::SmellsCollector
- Defined in:
- lib/watchr/smells_collector.rb
Instance Method Summary collapse
- #add(smell) ⇒ Object
- #all ⇒ Object
- #empty? ⇒ Boolean
-
#initialize ⇒ SmellsCollector
constructor
A new instance of SmellsCollector.
Constructor Details
#initialize ⇒ SmellsCollector
Returns a new instance of SmellsCollector.
3 4 5 |
# File 'lib/watchr/smells_collector.rb', line 3 def initialize @smells = Set.new end |
Instance Method Details
#add(smell) ⇒ Object
7 8 9 |
# File 'lib/watchr/smells_collector.rb', line 7 def add(smell) @smells.add(smell) end |
#all ⇒ Object
11 12 13 |
# File 'lib/watchr/smells_collector.rb', line 11 def all @smells end |
#empty? ⇒ Boolean
15 16 17 |
# File 'lib/watchr/smells_collector.rb', line 15 def empty? @smells.empty? end |