Class: CSSLint::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/csslint/source.rb

Class Method Summary collapse

Class Method Details

.contentsObject



8
9
10
# File 'lib/csslint/source.rb', line 8

def self.contents
  @contents ||= File.read(path)
end

.pathObject



3
4
5
6
# File 'lib/csslint/source.rb', line 3

def self.path
  ENV['CSSLINT_PATH'] ||
    File.expand_path("../../../vendor/csslint/release/csslint.js", __FILE__)
end

.versionObject



12
13
14
# File 'lib/csslint/source.rb', line 12

def self.version
  @version ||= contents.match( / api[.]version [ \t]* = [ \t]* " (\d+ [.] \d+ [.] \d+) "; /x )[0] || 'unknown';
end