Sha256: 07b074368375a9e43c3d98a2b626a0d7593cf6df1abde3b4f69d7232c061cced

Contents?: true

Size: 312 Bytes

Versions: 7

Compression:

Stored size: 312 Bytes

Contents

class Hola
  def self.hi(language = "english")
    translator = Translator.new(language)
    translator.hi
  end
end

class Hola::Translator
  def initialize(language)
    @language = language
  end

  def hi
    case @language
    when "spanish"
      "hola mundo"
    else
      "hello world"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hola_vaibhav-2.6.0 lib/hola.rb
hola_vaibhav-3.1.0 lib/hola.rb
hola_vaibhav-2.0.1 lib/hola.rb
hola_vaibhav-2.1.0 lib/hola.rb
hola_vaibhav-1.0.5 lib/hola.rb
hola_vaibhav-1.1.3 lib/hola.rb
hola_vaibhav-1.2.4 lib/hola.rb