Sha256: fb789406b2b5f3c3061b46c0b4db9a67c76075ac13191a87aedd9975dbcf5a12

Contents?: true

Size: 556 Bytes

Versions: 1

Compression:

Stored size: 556 Bytes

Contents

# encoding: utf-8
require 'jldrill/contexts/FileProgressContext'

module JLDrill::Test
    class FileProgress < JLDrill::FileProgressContext::FileProgress

        attr_reader :fraction, :calls
        attr_writer :fraction, :calls

        def initialize(context)
            super(context)
            @fraction = 0
            @calls = 0
        end

        def update(fraction)
            @fraction = fraction
        end

        def idle_add(&block)
            while !block.call
                @calls += 1
            end
        end
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jldrill-0.6.0.1 lib/jldrill/views/test/FileProgress.rb