Sha256: 12a2dfa8bb9aa3b0cae4ff810f257ffcf4047e32ade00b3577832c167a6a5b14
Contents?: true
Size: 579 Bytes
Versions: 13
Compression:
Stored size: 579 Bytes
Contents
require 'rubygems' require 'simple_service' class ConcatName < SimpleService::Command expects :first_name, :last_name returns :name def call self.name = "#{first_name} #{last_name}" end end class CreateHelloString < SimpleService::Command expects :name returns :hello def call 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').call puts result[:hello]
Version data entries
13 entries across 13 versions & 1 rubygems