Module: Black::Stylesheets

Defined in:
lib/black/stylesheets.rb

Constant Summary collapse

SyntaxStylesheet =
File.join(::Black.root, 'lib/black/templates/stylesheets/syntax.css.scss')
DiffStylesheet =
File.join(::Black.root, 'lib/black/templates/stylesheets/diff.css.scss')
DefaultOptions =
{
  syntax: :scss
}

Class Method Summary collapse

Class Method Details

.css(options = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/black/stylesheets.rb', line 11

def self.css(options={})
  template = File.open(DiffStylesheet).read
  template += File.open(SyntaxStylesheet).read

  render(template, options)
end

.diff(options = {}) ⇒ Object



23
24
25
26
# File 'lib/black/stylesheets.rb', line 23

def self.diff(options={})
  template = File.open(SyntaxStylesheet).read
  render(template, options)
end

.syntax(options = {}) ⇒ Object



18
19
20
21
# File 'lib/black/stylesheets.rb', line 18

def self.syntax(options={})
  template = File.open(SyntaxStylesheet).read
  render(template, options)
end