Skip to content

Instantly share code, notes, and snippets.

@RussellAndrewEdson
Last active August 29, 2015 14:16
Show Gist options
  • Save RussellAndrewEdson/63aaae9fd56a38d27854 to your computer and use it in GitHub Desktop.
Save RussellAndrewEdson/63aaae9fd56a38d27854 to your computer and use it in GitHub Desktop.
Rule 1 for the MIU system.
# Returns true if we can apply Rule 1 to the given string.
# (Rule 1: If the string ends with an I, we can add on a U at the end.)
def can_apply_rule1?(str)
str.end_with?("I")
end
# Applies Rule 1: We add a U to the end of the given string.
def apply_rule1(str)
str + "U"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment