Sha256: 54a912f2eaa7072fc66ded1d7b6f0a6c75113c9f1d303bd6f09a1b952f600b97

Contents?: true

Size: 850 Bytes

Versions: 14

Compression:

Stored size: 850 Bytes

Contents

# frozen_string_literal: true

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

            def result
              success(cow: cow)
            end

            private

            ##
            # Copied with ❤️ from https://github.com/gaborbata/rosetta-cow
            #
            def cow
              <<~'HEREDOC'.split("\n").map { |line| offset(line) }.join("\n")
                \   ^__^
                 \  (oo)\_______
                    (__)\       )\/\
                        ||----w |
                        ||     ||
              HEREDOC
            end

            def offset(line)
              " " * 10 + line
            end
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.11.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.10.1 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.10.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.9.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.8.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.7.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.6.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.5.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.4.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.3.1 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.3.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.2.1 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb
convenient_service-0.2.0 lib/convenient_service/examples/standard/cowsay/services/build_cow.rb