Class: Librarian::Linter::SourceLinter

Inherits:
Object
  • Object
show all
Defined in:
lib/librarian/linter/source_linter.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ SourceLinter

Returns a new instance of SourceLinter.



14
15
16
# File 'lib/librarian/linter/source_linter.rb', line 14

def initialize(klass)
  self.klass = klass
end

Instance Attribute Details

#klassObject

Returns the value of attribute klass.



11
12
13
# File 'lib/librarian/linter/source_linter.rb', line 11

def klass
  @klass
end

Class Method Details

.lint!(klass) ⇒ Object



6
7
8
# File 'lib/librarian/linter/source_linter.rb', line 6

def lint!(klass)
  new(klass).lint!
end

Instance Method Details

#lint!Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/librarian/linter/source_linter.rb', line 18

def lint!
  lint_class_responds_to! *[
    :lock_name,
    :from_spec_args,
    :from_lock_options,
  ]

  lint_instance_responds_to! *[
    :to_spec_args,
    :to_lock_options,
    :manifests,
    :fetch_version,
    :fetch_dependencies,
    :pinned?,
    :unpin!,
    :install!,
  ]
end