class CC::Analyzer::Formatters::HTMLFormatter::SourceFile
Attributes
filesystem[R]
path[R]
Public Class Methods
new(path, filesystem)
click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 217 def initialize(path, filesystem) @path = path @filesystem = filesystem end
Public Instance Methods
buffer()
click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 233 def buffer @buffer ||= SourceBuffer.new(path, code) end
code()
click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 229 def code filesystem.read_path(path) end
location(loc)
click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 237 def location(loc) Location.new(buffer, loc) end
syntaxes()
click to toggle source
# File lib/cc/analyzer/formatters/html_formatter.rb, line 224 def syntaxes ext = File.basename(path).split(".").last.downcase Array(LANGUAGES[ext]) end