Class: Voom::Presenters::WebClient::CustomCss

Inherits:
Object
  • Object
show all
Defined in:
lib/voom/presenters/web_client/custom_css.rb

Overview

This class renders custom CSS for the layout It looks for public/presenters/global.css first It then looks for public/presenters/#'REQUEST_PATH'.css

Instance Method Summary collapse

Constructor Details

#initialize(path, root:, host:) ⇒ CustomCss

Returns a new instance of CustomCss.



12
13
14
15
16
# File 'lib/voom/presenters/web_client/custom_css.rb', line 12

def initialize(path, root:, host:)
  @path = path
  @root = root
  @host = host
end

Instance Method Details

#renderObject



18
19
20
21
# File 'lib/voom/presenters/web_client/custom_css.rb', line 18

def render
  return unless custom_css_path
  [global_css, global_namespace_css(path), presenter_css(path)].join
end