Sha256: 7ee1f4f23d6d1069e9b4cc5554432f8cde5c55ca0ee0546baad58d5e6a2339f8
Contents?: true
Size: 837 Bytes
Versions: 8
Compression:
Stored size: 837 Bytes
Contents
module Locomotive module Import class Base include Logger attr_reader :context, :options def initialize(context, options) @context = context @options = options self.log "*** starting to process ***" end def self.process(context, options) self.new(context, options).process end def process raise 'this method has to be overidden' end def log(message) super(message, self.class.name.demodulize.underscore) end protected def site @context[:site] end def database @context[:database] end def theme_path @context[:theme_path] end def open_sample_asset(url) File.open(File.join(self.theme_path, 'public', url)) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems