Sha256: 2bc40c456170f472182718a35dbfd84fede71f1269799edad8ce961deb122ac7

Contents?: true

Size: 558 Bytes

Versions: 38

Compression:

Stored size: 558 Bytes

Contents

module Saviour
  module Uploader
    class StoreDirExtractor
      def initialize(uploader)
        @uploader = uploader
      end

      def store_dir_handler
        @store_dir_handler ||= @uploader.class.store_dirs.last
      end

      def store_dir
        @store_dir ||= begin
          if store_dir_handler
            if store_dir_handler.respond_to?(:call)
              @uploader.instance_eval(&store_dir_handler)
            else
              @uploader.send(store_dir_handler)
            end
          end
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
saviour-0.6.10 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.9 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.8 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.7 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.6 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.5 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.4 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.3 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.2 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.1 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.6.0 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.5.11 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.5.10 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.5.9 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.5.8 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.5.7 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.5.6 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.5.5 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.5.4 lib/saviour/uploader/store_dir_extractor.rb
saviour-0.5.3 lib/saviour/uploader/store_dir_extractor.rb