class

CodeStatisticsCalculator

v7.1.3.2 - Show latest stable - Superclass: Object

frozen_string_literal: true

Constants

PATTERNS = {\nrb: {\nline_comment: /^\\s*#/,\nbegin_block_comment: /^=begin/,\nend_block_comment: /^=end/,\nclass: /^\\s*class\\s+[_A-Z]/,\nmethod: /^\\s*def\\s+[_a-z]/,\n},\nerb: {\nline_comment: %r{((^\\s*<%#.*%>)|(<!--.*-->))},\n},\ncss: {\nline_comment: %r{^\\s*/\\*.*\\*/},\n},\nscss: {\nline_comment: %r{((^\\s*/\\*.*\\*/)|(^\\s*//))},\n},\njs: {\nline_comment: %r{^\\s*//},\nbegin_block_comment: %r{^\\s*/\\*},\nend_block_comment: %r{\\*/},\nmethod: /function(\\s+[_a-zA-Z][\\da-zA-Z]*)?\\s*\\(/,\n},\ncoffee: {\nline_comment: /^\\s*#/,\nbegin_block_comment: /^\\s*###/,\nend_block_comment: /^\\s*###/,\nclass: /^\\s*class\\s+[_A-Z]/,\nmethod: /[-=]>/,\n}\n}

Attributes

[R]classes
[R]code_lines
[R]lines
[R]methods

Files

  • railties/lib/rails/code_statistics_calculator.rb