You're taking your first steps into Ruby
A good introduction to programming in general. Easy on newer programmers.
COUNTRY_LETTERS = 'A'.upto('Z').each.with_index(127462).to_h.freeze | |
def country_emoji(iso) | |
COUNTRY_LETTERS.values_at(*iso.chars).pack('U*') | |
end | |
country_emoji('GB') | |
#=> "🇬🇧" |
require_relative 'tuple_space' | |
class Cache | |
def initialize | |
@memory = TupleSpace.new(reaper_period_in_secs: 10, expires_in_secs: 60) | |
end | |
def get(request) | |
@memory[request] | |
end |
require_relative 'tuple_space' | |
class Cache | |
def initialize | |
@memory = TupleSpace.new(reaper_period_in_secs: 10, expires_in_secs: 60) | |
end | |
def get(request) | |
@memory[request] | |
end |
You're taking your first steps into Ruby
A good introduction to programming in general. Easy on newer programmers.
Getting started:
Related tutorials: