Class: Watchr::Smell

Inherits:
Object
  • Object
show all
Defined in:
lib/watchr/smell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, context, description) ⇒ Smell

Returns a new instance of Smell.



6
7
8
9
10
11
# File 'lib/watchr/smell.rb', line 6

def initialize(type, context, description)
  @type = type
  @context = context
  @description = description
  @locations = []
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



3
4
5
# File 'lib/watchr/smell.rb', line 3

def context
  @context
end

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/watchr/smell.rb', line 3

def description
  @description
end

#detailsObject

Returns the value of attribute details.



4
5
6
# File 'lib/watchr/smell.rb', line 4

def details
  @details
end

#locationsObject (readonly)

Returns the value of attribute locations.



3
4
5
# File 'lib/watchr/smell.rb', line 3

def locations
  @locations
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/watchr/smell.rb', line 3

def type
  @type
end

Instance Method Details

#add_location(location) ⇒ Object



13
14
15
# File 'lib/watchr/smell.rb', line 13

def add_location(location)
  @locations << location
end