class Sprockets::Vue::Style
Constants
- STYLE_COMPILES
- STYLE_REGEX
Public Class Methods
cache_key()
click to toggle source
# File lib/sprockets/vue/style.rb, line 23 def cache_key [ self.name, VERSION, ].freeze end
call(input)
click to toggle source
# File lib/sprockets/vue/style.rb, line 10 def call(input) data = input[:data] input[:cache].fetch([cache_key, input[:filename], data]) do style = STYLE_REGEX.match(data) if style input[:data] = style[:content] STYLE_COMPILES[style[:lang]].call(input) else '' end end end