Class: Reviewer::Doctor::Report::Observation

Inherits:
Struct
  • Object
show all
Defined in:
lib/reviewer/doctor/report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#kindObject

Returns the value of attribute kind

Returns:

  • the current value of kind



18
19
20
# File 'lib/reviewer/doctor/report.rb', line 18

def kind
  @kind
end

#locationObject

Returns the value of attribute location

Returns:

  • the current value of location



18
19
20
# File 'lib/reviewer/doctor/report.rb', line 18

def location
  @location
end

#pathObject

Returns the value of attribute path

Returns:

  • the current value of path



18
19
20
# File 'lib/reviewer/doctor/report.rb', line 18

def path
  @path
end

#valueObject

Returns the value of attribute value

Returns:

  • the current value of value



18
19
20
# File 'lib/reviewer/doctor/report.rb', line 18

def value
  @value
end

Instance Method Details

#to_hObject



19
20
21
22
23
# File 'lib/reviewer/doctor/report.rb', line 19

def to_h
  source = { path: path }
  source[:location] = location if location
  { kind: kind, value: value, source: source }.compact
end