Class: ZendeskAppsSupport::StylesheetCompiler
- Inherits:
-
Object
- Object
- ZendeskAppsSupport::StylesheetCompiler
- Defined in:
- lib/zendesk_apps_support/stylesheet_compiler.rb
Instance Method Summary collapse
- #app_asset_url(name) ⇒ Object
- #compile ⇒ Object
-
#initialize(source, app_id, url_prefix) ⇒ StylesheetCompiler
constructor
A new instance of StylesheetCompiler.
Constructor Details
#initialize(source, app_id, url_prefix) ⇒ StylesheetCompiler
Returns a new instance of StylesheetCompiler.
6 7 8 |
# File 'lib/zendesk_apps_support/stylesheet_compiler.rb', line 6 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
14 15 16 |
# File 'lib/zendesk_apps_support/stylesheet_compiler.rb', line 14 def app_asset_url(name) "#{@url_prefix}#{name}" end |
#compile ⇒ Object
10 11 12 |
# File 'lib/zendesk_apps_support/stylesheet_compiler.rb', line 10 def compile Sass::Engine.new(wrapped_source, :syntax => :scss, :app_asset_url_builder => self).render end |