Class: ZendeskAppsSupport::StylesheetCompiler

Inherits:
Object
  • Object
show all
Defined in:
lib/zendesk_apps_support/stylesheet_compiler.rb

Instance Method Summary collapse

Constructor Details

#initialize(source, app_id, url_prefix) ⇒ StylesheetCompiler

Returns a new instance of StylesheetCompiler.



5
6
7
# File 'lib/zendesk_apps_support/stylesheet_compiler.rb', line 5

def initialize(source, app_id, url_prefix)
  @source, @app_id, @url_prefix = source, app_id, url_prefix
end

Instance Method Details

#app_asset_url(name) ⇒ Object



13
14
15
# File 'lib/zendesk_apps_support/stylesheet_compiler.rb', line 13

def app_asset_url(name)
  "#{@url_prefix}#{name}"
end

#compileObject



9
10
11
# File 'lib/zendesk_apps_support/stylesheet_compiler.rb', line 9

def compile
  Sass::Engine.new(wrapped_source, syntax: :scss, app_asset_url_builder: self).render
end