Sha256: 0ccc28e246b3b5b167dbca72a910734ae5bbc9eb86d75d893f75147c6454840c

Contents?: true

Size: 547 Bytes

Versions: 10

Compression:

Stored size: 547 Bytes

Contents

module Monkeyshines
  module Store
    class Base
      attr_accessor :options
      def initialize _options={}
        self.options = _options
        Log.info "Creating #{self.class}"
      end

      #
      def each_as klass, &block
        self.each do |*args|
          begin
            item = klass.new *args[1..-1]
          rescue Exception => e
            Log.info [args, e.to_s, self].join("\t")
            raise e
          end
          yield item
        end
      end

      def log_line
        nil
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
wukong-1.5.2 lib/wukong/store/base.rb
wukong-1.5.1 lib/wukong/store/base.rb
wukong-1.5.0 lib/wukong/store/base.rb
wukong-1.4.12 lib/wukong/store/base.rb
wukong-1.4.11 lib/wukong/store/base.rb
monkeyshines-0.2.3 lib/monkeyshines/store/base.rb
monkeyshines-0.2.2 lib/monkeyshines/store/base.rb
monkeyshines-0.2.1 lib/monkeyshines/store/base.rb
monkeyshines-0.2.0 lib/monkeyshines/store/base.rb
monkeyshines-0.0.2 lib/monkeyshines/store/base.rb