Sha256: 4255d08ce0b958fea073fd48a903a8d84117a6a1750c62c04bc92535e2579085

Contents?: true

Size: 778 Bytes

Versions: 2

Compression:

Stored size: 778 Bytes

Contents

module <%= DCA.project_name %>
  module Areas
    module <%= @class_name %>
      # Base analyze jobs class for <%=@class_name%> area.
      class AnalyzerJob < DCA::Jobs::AnalyzerJob
        def change
          false
        end

        def positions &block
          page = Page.find options[:category]
          until page.nil? do
            logger.debug "Page number #{page.number}"

            page.positions.each do |position|
              begin
                block.call position
              rescue Exception => e
                logger.exception e
              end
            end

            break if shutdown?
            break unless page.next
          end
        end

        def fetch position
          position
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dca-0.1.1 lib/dca/commands/templates/area/analyzer.rb.erb
dca-0.1.0 lib/dca/commands/templates/area/analyzer.rb.erb