Module: Bibliothecary::Analyser

Defined Under Namespace

Modules: Analysis, ClassMethods, Determinations, Matchers, TryCache

Class Method Summary collapse

Class Method Details

.create_analysis(platform_name, relative_path, kind, dependencies) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/bibliothecary/analyser.rb', line 19

def self.create_analysis(platform_name, relative_path, kind, dependencies)
  {
    platform: platform_name,
    path: relative_path,
    dependencies: dependencies,
    kind: kind,
    success: true
  }
end

.create_error_analysis(platform_name, relative_path, kind, message, location = nil) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/bibliothecary/analyser.rb', line 7

def self.create_error_analysis(platform_name, relative_path, kind, message, location=nil)
  {
    platform: platform_name,
    path: relative_path,
    dependencies: nil,
    kind: kind,
    success: false,
    error_message: message,
    error_location: location,
  }
end

.included(base) ⇒ Object



29
30
31
32
33
34
35
36
# File 'lib/bibliothecary/analyser.rb', line 29

def self.included(base)
  base.extend(ClassMethods)

  # Group like-methods into separate modules for easier comprehension.
  base.extend(Bibliothecary::Analyser::Matchers)
  base.extend(Bibliothecary::Analyser::Determinations)
  base.extend(Bibliothecary::Analyser::Analysis)
end