Skip to content

Instantly share code, notes, and snippets.

@svenfuchs

svenfuchs/gist:4838

Created Aug 11, 2008
Embed
What would you like to do?
class Locale # is this a String? maybe not.
attr :language, :script, :region, :variant, :extension, :private_use
def valid?
# validate against RFC4646
end
def parent
# return 'en' for 'en-US' etc.
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment