Sha256: 8cb81a663afc6dadade2e5689291be9b99d2041306be4b78ea8e8cc24f734091
Contents?: true
Size: 262 Bytes
Versions: 3
Compression:
Stored size: 262 Bytes
Contents
require "./lib/kommando" calls = [] k = Kommando.new("$ exit 0") k.when(:success) do calls << :success end.when(:failed) do calls << :failed # should never happen end.when(:exit) do calls << :exit end k.run raise "err" unless calls == [:exit, :success]
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kommando-0.1.2 | examples/when_chaining.rb |
kommando-0.1.1 | examples/when_chaining.rb |
kommando-0.1.0 | examples/when_chaining.rb |