Class: Reviewer::Setup::Detector::Source
- Inherits:
-
Struct
- Object
- Struct
- Reviewer::Setup::Detector::Source
- Defined in:
- lib/reviewer/setup/detector.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#location ⇒ Object
Returns the value of attribute location.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind
8 9 10 |
# File 'lib/reviewer/setup/detector.rb', line 8 def kind @kind end |
#location ⇒ Object
Returns the value of attribute location
8 9 10 |
# File 'lib/reviewer/setup/detector.rb', line 8 def location @location end |
#path ⇒ Object
Returns the value of attribute path
8 9 10 |
# File 'lib/reviewer/setup/detector.rb', line 8 def path @path end |
Instance Method Details
#description ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/reviewer/setup/detector.rb', line 9 def description case kind when :dependency then "#{location} in #{path}" when :directory then "#{path}/ directory" else path end end |
#to_h ⇒ Object
17 18 19 20 21 |
# File 'lib/reviewer/setup/detector.rb', line 17 def to_h source = { path: path } source[:location] = location if location { kind: kind, source: source } end |