Class: SixthSense::Analyzer

Inherits:
Object
  • Object
show all
Defined in:
lib/sixth_sense/analyzer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.analyzer_id(id = nil) ⇒ Object



19
20
21
22
23
# File 'lib/sixth_sense/analyzer.rb', line 19

def analyzer_id(id = nil)
  return @analyzer_id unless id

  @analyzer_id = id
end

.axis(value = nil) ⇒ Object



25
26
27
28
29
# File 'lib/sixth_sense/analyzer.rb', line 25

def axis(value = nil)
  return @axis unless value

  @axis = value
end

.inherited(subclass) ⇒ Object



14
15
16
17
# File 'lib/sixth_sense/analyzer.rb', line 14

def inherited(subclass)
  super
  SixthSense.register_analyzer(subclass)
end

.level(value = nil) ⇒ Object



31
32
33
34
35
# File 'lib/sixth_sense/analyzer.rb', line 31

def level(value = nil)
  return @level unless value

  @level = value
end

.reference(authors:, title:, venue:, year:, doi: nil) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'lib/sixth_sense/analyzer.rb', line 37

def reference(authors:, title:, venue:, year:, doi: nil)
  references << Result::Reference.new(
    authors: authors,
    title: title,
    venue: venue,
    year: year,
    doi: doi
  )
end

.referencesObject



47
48
49
# File 'lib/sixth_sense/analyzer.rb', line 47

def references
  @references ||= []
end

Instance Method Details

#analyze(_test_file, _context) ⇒ Object

Raises:

  • (NotImplementedError)


52
53
54
# File 'lib/sixth_sense/analyzer.rb', line 52

def analyze(_test_file, _context)
  raise NotImplementedError
end