Class: Watchr::SmellBuilder
- Inherits:
-
Object
- Object
- Watchr::SmellBuilder
- Includes:
- SmellTypes
- Defined in:
- lib/watchr/smell_builder.rb
Constant Summary
Constants included from SmellTypes
Watchr::SmellTypes::ALL_SMELLS
Instance Attribute Summary collapse
-
#smell ⇒ Object
readonly
Returns the value of attribute smell.
Instance Method Summary collapse
- #add_details(details) ⇒ Object
- #add_location(file, line) ⇒ Object
-
#initialize(type, context, description) ⇒ SmellBuilder
constructor
A new instance of SmellBuilder.
Constructor Details
#initialize(type, context, description) ⇒ SmellBuilder
Returns a new instance of SmellBuilder.
10 11 12 13 14 |
# File 'lib/watchr/smell_builder.rb', line 10 def initialize(type, context, description) assert_valid_smell_type(type) @smell = Smell.new(type, context, description) end |
Instance Attribute Details
#smell ⇒ Object (readonly)
Returns the value of attribute smell.
8 9 10 |
# File 'lib/watchr/smell_builder.rb', line 8 def smell @smell end |
Instance Method Details
#add_details(details) ⇒ Object
20 21 22 |
# File 'lib/watchr/smell_builder.rb', line 20 def add_details(details) @smell.details = details end |