Sha256: 8a059a786055047915bb18e6be5dd54466a5af88f61e02b45b116d4c82264b3d

Contents?: true

Size: 1.14 KB

Versions: 52

Compression:

Stored size: 1.14 KB

Contents

module SOULs
  module Painter
    class << self
      def create_file(text)
        puts(Paint % ["✓ %{white_text}", :green, { white_text: ["Created file #{text}", :white] }])
      end

      def update_file(text)
        puts(Paint % ["✓ %{white_text}", :yellow, { white_text: ["Updated file #{text}", :white] }])
      end

      def delete_file(text)
        puts(Paint % ["✓ %{white_text}", :red, { white_text: ["Deleted file #{text}", :white] }])
      end

      def error(text, emoji = nil)
        if emoji
          puts(Paint["#{emoji} #{text}", :red])
        else
          puts(Paint["🚨 #{text}", :red])
        end
      end

      def warning(text, emoji = nil)
        if emoji
          puts(Paint["#{emoji} #{text}", :yellow])
        else
          puts(Paint["🚨 #{text}", :yellow])
        end
      end

      def success(text, emoji = nil)
        if emoji
          puts(Paint["#{emoji} #{text}", :green])
        else
          puts(Paint["🎉 #{text}", :green])
        end
      end

      def sync(text)
        puts(Paint % ["✓ %{white_text}", :blue, { white_text: ["Synced #{text}", :white] }])
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
souls-4.1.2 lib/souls/app/utils/painter.rb
souls-4.1.1 lib/souls/app/utils/painter.rb
souls-4.1.0 lib/souls/app/utils/painter.rb
souls-4.0.3 lib/souls/app/utils/painter.rb
souls-4.0.2 lib/souls/app/utils/painter.rb
souls-4.0.1 lib/souls/app/utils/painter.rb
souls-4.0.0 lib/souls/app/utils/painter.rb
souls-3.0.8 lib/souls/app/utils/painter.rb
souls-3.0.7 lib/souls/app/utils/painter.rb
souls-3.0.6 lib/souls/app/utils/painter.rb
souls-3.0.5 lib/souls/app/utils/painter.rb
souls-3.0.4 lib/souls/app/utils/painter.rb
souls-3.0.3 lib/souls/app/utils/painter.rb
souls-3.0.2 lib/souls/app/utils/painter.rb
souls-3.0.1 lib/souls/app/utils/painter.rb
souls-3.0.0 lib/souls/app/utils/painter.rb
souls-2.0.4 lib/souls/app/utils/painter.rb
souls-2.0.3 lib/souls/app/utils/painter.rb
souls-2.0.2 lib/souls/app/utils/painter.rb
souls-2.0.1 lib/souls/app/utils/painter.rb