Class: CSSLint::Source
- Inherits:
-
Object
- Object
- CSSLint::Source
- Defined in:
- lib/csslint/source.rb
Class Method Summary collapse
Class Method Details
.contents ⇒ Object
8 9 10 |
# File 'lib/csslint/source.rb', line 8 def self.contents @contents ||= File.read(path) end |
.path ⇒ Object
3 4 5 6 |
# File 'lib/csslint/source.rb', line 3 def self.path ENV['CSSLINT_PATH'] || File.("../../../vendor/csslint/release/csslint.js", __FILE__) end |
.version ⇒ Object
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 |