Sha256: 6608972d37596c5a9e2c1b330b5889d89ce2e2228f71cf97319ec1543f4ab7cc
Contents?: true
Size: 827 Bytes
Versions: 15
Compression:
Stored size: 827 Bytes
Contents
module ATP # Program is the top-level container for a collection of test flows class Program # Load a program from a previously saved file def self.load(file) p = nil File.open(file) do |f| p = Marshal.load(f) end p end def flow(name, options = {}) flows[name] ||= Flow.new(self, name, options) end def flows @flows ||= {} end # Save the program to a file def save(file) File.open(file, 'w') do |f| Marshal.dump(self, f) end 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
15 entries across 15 versions & 1 rubygems