Sha256: 7fad1cee00fbffdac91a3ba3bd67c98a17c9dd2fded319ffb222b7d99638f5e1
Contents?: true
Size: 866 Bytes
Versions: 7
Compression:
Stored size: 866 Bytes
Contents
require "pp" require "minitest/autorun" require "trailblazer/operation" Minitest::Spec::Activity = Trailblazer::Activity module Test # Create a step method in `klass` with the following body. # # def a(options, a_return:, data:, **) # data << :a # # a_return # end def self.step(klass, *names) names.each do |name| method_def = %{def #{name}(options, #{name}_return:, data:, **) data << :#{name} #{name}_return end} klass.class_eval(method_def) end end # builder for PlusPoles def self.plus_poles_for(mapping) ary = mapping.collect { |evt, semantic| [Trailblazer:: Activity::Output(evt, semantic), semantic ] } Trailblazer::Activity::Magnetic::DSL::PlusPoles.new.merge(::Hash[ary]) end end Minitest::Spec.class_eval do Activity = Trailblazer::Activity end
Version data entries
7 entries across 7 versions & 1 rubygems