Sha256: 6e90ebe8063750c5efd35d3dca1fa4df41c572ee28c155df5f394a7438d1f15c
Contents?: true
Size: 770 Bytes
Versions: 5
Compression:
Stored size: 770 Bytes
Contents
require 'tmpdir' module Shutterbug module Handlers module FileHandlers class Base attr_accessor :config def self.instance return @instance || self.new end def initialize(_config = Configuration.instance) self.config = _config end def urlify(name) "#{self.config.uri_prefix}#{self.path_prefix}/#{name}" end def path_prefix "#{self.config.path_prefix}/get_#{file_extension}" end def filename_matcher "(([^\/|\.]+)\.?([^\/]+))?" end def regex /#{path_prefix}\/#{filename_matcher}/ end def filename(base) "#{base}.#{file_extension}" end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems