Sha256: f7abf0e25f39eb42a545bd6de82258ef8b33ad116d7f2f91f3ddfac0b7be4fdf

Contents?: true

Size: 470 Bytes

Versions: 2

Compression:

Stored size: 470 Bytes

Contents

# translater content by language
module BoneHola
  class Translator
    attr_accessor :language
    private :language, :language=

    # init say language
    def initialize(language)
      self.language = language
    end

    # Say hi to the world through tree languanges
    def hi
      case language
        when "english"
          "Hello World!"
        when "spanish"
          "hola mundo!"
        else
          "你好,世界!"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bone_hola-0.1.1 lib/bone_hola/translator.rb
bone_hola-0.1.0 lib/bone_hola/translator.rb