Sha256: 77f785a535d37815dc1e0e92d7c96078d3aef585e3ac89cd6ae2474746a15ed8

Contents?: true

Size: 319 Bytes

Versions: 1

Compression:

Stored size: 319 Bytes

Contents

class Hola
	def self.hi(language = :english)
		translator = Translator.new(language)
		puts 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

# require 'hola/translator'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hola_mayankjani-1.0.2 lib/hola.rb