Sha256: 980086a7b8e9485e432eb174bc094fe5be2863f250510fc456af18d74d1e6805
Contents?: true
Size: 745 Bytes
Versions: 1
Compression:
Stored size: 745 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.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shutterbug-0.1.0 | lib/shutterbug/handlers/file_handlers/base.rb |