Skip to content

Instantly share code, notes, and snippets.

@smnplk smnplk/vlado_gist
Last active Aug 29, 2015

Embed
What would you like to do?
Vladimirjev jedilnik (generator)
vlado_konzumira = ['palačinke', 'hood burger', 'humus',
'piščanca od jakliča', 'ribji namaz',
'polento', 'hruškino nabodalo', 'kosmiče na žaru']
vladotov_menu = Date::DAYNAMES.inject({}) do |menu, day|
menu[day.downcase.to_sym] = "Vlado bo danes jedel #{vlado_konzumira[rand(vlado_konzumira.size)]}"
menu
end
puts vladotov_menu
#primer :)
#{:sunday=>"Vlado bo danes jedel polento", :monday=>"Vlado bo danes jedel hood burger",
#:tuesday=>"Vlado bo danes jedel polento", :wednesday=>"Vlado bo danes jedel humus",
#:thursday=>"Vlado bo danes jedel humus", :friday=>"Vlado bo danes jedel palačinke",
#:saturday=>"Vlado bo danes jedel hruškino nabodalo"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.