Sha256: c72573f35f1a49268bf410d7bd0863b420210449176c4d372e8a191d7f20681e

Contents?: true

Size: 686 Bytes

Versions: 13

Compression:

Stored size: 686 Bytes

Contents

require 'rubygems'
require 'simple_service'

class Increment < SimpleService::Command
  expects :counter
  returns :counter

  def execute
    self.counter += 1
  end
end

class IncrementCounter < SimpleService::Organizer
  expects :counter
  returns :counter
  commands Increment, Increment, Increment
end

class ReallyIncrementThatCounter < SimpleService::Organizer
  expects :counter
  returns :counter
  commands IncrementCounter, IncrementCounter, IncrementCounter
end

result = IncrementCounter.new(counter: 0).execute
puts "IncrementCounter: #{result[:counter]}"

result = ReallyIncrementThatCounter.new(counter: 0).execute
puts "ReallyIncrementThatCounter: #{result[:counter]}"

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
simple_service-1.4.1 example/nested_services.rb
simple_service-1.4.0 example/nested_services.rb
simple_service-1.3.91 example/nested_services.rb
simple_service-1.3.9 example/nested_services.rb
simple_service-1.3.8 example/nested_services.rb
simple_service-1.3.5 example/nested_services.rb
simple_service-1.3.4 example/nested_services.rb
simple_service-1.3.3 example/nested_services.rb
simple_service-1.3.2 example/nested_services.rb
simple_service-1.3.1 example/nested_services.rb
simple_service-1.3.0 example/nested_services.rb
simple_service-1.2.6 example/nested_services.rb
simple_service-1.2.5 example/nested_services.rb