Sha256: 329b91860f61673a65f69ff47275f55f33cf45a90baedfba8baf6288166e86eb

Contents?: true

Size: 1.27 KB

Versions: 4

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true

module Codebreaker
  module Entities
    class Renderer
      def message(msg_name, hashee = {})
        puts I18n.t(msg_name, hashee)
      end

      def start_message
        message(:start_message)
      end

      def rules
        message(:rules)
      end

      def goodbye_message
        message(:goodbye_message)
      end

      def save_results_message
        message(:save_results_message)
      end

      def win_game_message
        message(:win_game_message)
      end

      def round_message
        message(:round_message)
      end

      def lost_game_message(code)
        message(:lost_game_message, code: code)
      end

      def no_hints_message?
        message(:have_no_hints_message)
      end

      def print_hint_number(code)
        message(:print_hint_number, code: code)
      end

      def registration_name_emptyness_error
        message(:registration_name_emptyness_error)
      end

      def registration_name_length_error
        message(:registration_name_length_error)
      end

      def command_error
        message(:command_error)
      end

      def command_length_error
        message(:command_length_error)
      end

      def command_int_error
        message(:command_int_error)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
codebreaker-yeroshek-0.1.5 lib/codebreaker/entities/renderer.rb
codebreaker-yeroshek-0.1.4 lib/codebreaker/entities/renderer.rb
codebreaker-yeroshek-0.1.3 lib/codebreaker/entities/renderer.rb
codebreaker-yeroshek-0.1.2 lib/codebreaker/entities/renderer.rb