Sha256: c7ebd10b03d467783527171806bc223d10b751eb5cd7c30a4ff5d776b37e137d

Contents?: true

Size: 497 Bytes

Versions: 1

Compression:

Stored size: 497 Bytes

Contents

module ATP
  # Program is the top-level container for a collection of test flows
  class Program
    def flow(name)
      flows[name] ||= Flow.new(self, name)
    end

    def flows
      @flows ||= {}
    end

    def respond_to?(*args)
      flows.key?(args.first) || super
    end

    def method_missing(method, *args, &block) # :nodoc:
      if f = flows[method]
        define_singleton_method method do
          f
        end
        f
      else
        super
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
atp-0.2.1 lib/atp/program.rb