Class: Gemfilelint::Parser::Valid
- Inherits:
-
Struct
- Object
- Struct
- Gemfilelint::Parser::Valid
- Defined in:
- lib/gemfilelint.rb
Instance Attribute Summary collapse
-
#dsl ⇒ Object
Returns the value of attribute dsl.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#dsl ⇒ Object
Returns the value of attribute dsl
52 53 54 |
# File 'lib/gemfilelint.rb', line 52 def dsl @dsl end |
#path ⇒ Object
Returns the value of attribute path
52 53 54 |
# File 'lib/gemfilelint.rb', line 52 def path @path end |
Instance Method Details
#each_offense(ignore: []) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/gemfilelint.rb', line 53 def each_offense(ignore: []) dependencies.each do |name| next if ignore.include?(name) if (corrections = Gemfilelint.dependencies.correct(name)).any? yield Offenses::Dependency.new(path, name, corrections.first(5)) else yield nil end end remotes.each do |uri| if (corrections = Gemfilelint.remotes.correct(uri)).any? yield Offenses::Remote.new(path, uri, corrections) else yield nil end end end |