Sha256: 4e03f7b127832980e11029374270fdeab923e62a2225a53683581e155dfbf370

Contents?: true

Size: 309 Bytes

Versions: 4

Compression:

Stored size: 309 Bytes

Contents

module Elevate
  class DSL
    def initialize(&block)
      instance_eval(&block)
    end

    attr_reader :started_callback
    attr_reader :finished_callback

    def on_started(&block)
      @started_callback = block
    end

    def on_completed(&block)
      @finished_callback = block
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
elevate-0.3.3 lib/elevate/dsl.rb
elevate-0.3.2 lib/elevate/dsl.rb
elevate-0.3.1 lib/elevate/dsl.rb
elevate-0.3 lib/elevate/dsl.rb