class Codeqa::Checkers::CheckLinkto

Public Class Methods

check?(sourcefile) click to toggle source
# File lib/codeqa/checkers/check_linkto.rb, line 14
def self.check?(sourcefile)
  sourcefile.erb?
end

Private Class Methods

pattern() click to toggle source
# File lib/codeqa/checkers/check_linkto.rb, line 20
def self.pattern
  @pattern ||= /<% link_to.* do.*%>/
end

Public Instance Methods

hint() click to toggle source
# File lib/codeqa/checkers/check_linkto.rb, line 10
def hint
  "<% link_to ... do ... %> detected add an '=' after the <%"
end
name() click to toggle source
# File lib/codeqa/checkers/check_linkto.rb, line 6
def name
  'link_to'
end

Private Instance Methods

error_msg(_line, line_number, _pos) click to toggle source
# File lib/codeqa/checkers/check_linkto.rb, line 23
def error_msg(_line, line_number, _pos)
  "old style block link_to in line #{line_number}"
end