Class: GemBemobileHelloWorld::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_bemobile_hello_world/generator.rb

Class Method Summary collapse

Class Method Details

.random_greeting(name) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/gem_bemobile_hello_world/generator.rb', line 3

def self.random_greeting name 
  greetings = ["Hello","Bonjour","Hola","Guten tag",
    "Hej","Salve","Nǐ Hǎo","Xin chào","Hei","Ahoj"
  ]
  # Creates a random greeting string
  "#{greetings.sample}, #{name}"
end