Sha256: 035782991b949c09f079d21afc146d8ac494aecd952eb96d1d8a09f03fb1cfca
Contents?: true
Size: 794 Bytes
Versions: 5
Compression:
Stored size: 794 Bytes
Contents
# frozen_string_literal: true module Mako class SassRenderer include FileOpenUtil attr_reader :template def initialize(args) @template = args.fetch(:template, File.expand_path(File.join('themes', "#{Mako.config.theme}.scss"), Dir.pwd)) end # Wrapper for Sass::Engine. Creates new Sass::Engine instance with main # Sass file and renders it. # # @return [String] def render Sass::Engine.new(load_resource(template), syntax: :scss, load_paths: [File.expand_path('themes/', Dir.pwd)], style: :compressed).render end # Default file name for rendererd file. # # @return [String] def file_path 'main.css' end end end
Version data entries
5 entries across 5 versions & 1 rubygems