class Polymer::Rails::SprocketsProcessor

Public Class Methods

call(input) click to toggle source
# File lib/polymer-rails/processors/sprockets_processor.rb, line 9
def self.call(input)
  @@sprockets_env = input[:environment]
  instance.call(input)
end
instance() click to toggle source
# File lib/polymer-rails/processors/sprockets_processor.rb, line 5
def self.instance
  @instance ||= new
end

Public Instance Methods

call(input) click to toggle source
# File lib/polymer-rails/processors/sprockets_processor.rb, line 14
def call(input)
  prepare(input)
  data = process

  @context.metadata.merge(data: data)
end

Private Instance Methods

prepare(input) click to toggle source
# File lib/polymer-rails/processors/sprockets_processor.rb, line 23
def prepare(input)
  @context = input[:environment].context_class.new(input)
  @component = Component.new(input[:data])
end