Sha256: b6dd9d3f230b2709a55ad8a98999069b0411f0a7c97ac1db24e13f834d37276b

Contents?: true

Size: 671 Bytes

Versions: 5

Compression:

Stored size: 671 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Examples
    module Standard
      class Cowsay
        module Services
          class Print
            include ConvenientService::Standard::Config

            attr_reader :text, :out

            step Services::BuildCloud, in: :text, out: :cloud
            step Services::BuildCow, out: :cow
            step :result

            def initialize(text: "Hello World!", out: $stdout)
              @text = text
              @out = out
            end

            def result
              out.puts cloud + cow

              success
            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
convenient_service-0.17.0 lib/convenient_service/examples/standard/cowsay/services/print.rb
convenient_service-0.16.0 lib/convenient_service/examples/standard/cowsay/services/print.rb
convenient_service-0.15.0 lib/convenient_service/examples/standard/cowsay/services/print.rb
convenient_service-0.14.0 lib/convenient_service/examples/standard/cowsay/services/print.rb
convenient_service-0.13.0 lib/convenient_service/examples/standard/cowsay/services/print.rb