Sha256: d981aa27889c9223942e2ad41e3fd724d612a7dc8131877045b44e9320d89df2
Contents?: true
Size: 602 Bytes
Versions: 2
Compression:
Stored size: 602 Bytes
Contents
require 'rubygems' require 'pry' require 'simple_service' class ConcatName < SimpleService::Command expects :first_name, :last_name returns :name def execute self.name = "#{first_name} #{last_name}" end end class CreateHelloString < SimpleService::Command expects :name returns :hello def execute self.hello = "#{name}, say hello world!" end end class SayHello < SimpleService::Organizer expects :first_name, :last_name returns :hello commands ConcatName, CreateHelloString end result = SayHello.new(first_name: 'Ruby', last_name: 'Gem').execute puts result[:hello]
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simple_service-1.0.2 | example/hello_world.rb |
simple_service-1.0.1 | example/hello_world.rb |