Sha256: 739cb2bac3e9517bc86a55994e4e190c93eb4feb206de98d35ef057554e1e298
Contents?: true
Size: 583 Bytes
Versions: 2
Compression:
Stored size: 583 Bytes
Contents
# frozen_string_literal: true require 'bundler/setup' require 'neco' class Command1 include Neco::Command main do set :cat_name, 'Tama' end rollback do puts 'Rolling back Command1!' end end class Command2 include Neco::Command main do |cat_name:| puts "Hello, #{cat_name}!" end rollback do puts 'Rolling back Command2!' end end class Command3 include Neco::Command # Unused block argument main do |cat_name:| raise 'OMG!!!' end end class Bar include Neco::Composition composes Command1, Command2, Command3 end Bar.call
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
neco-0.2.0 | examples/composition.rb |
neco-0.1.0 | examples/composition.rb |