Skip to content

Instantly share code, notes, and snippets.

@n00ge
Created June 11, 2013 17:34
Show Gist options
  • Select an option

  • Save n00ge/5758935 to your computer and use it in GitHub Desktop.

Select an option

Save n00ge/5758935 to your computer and use it in GitHub Desktop.
Method sorting (last occurance)
class LastOccuranceService
def go!
method_a
method_b
end
private
def method_a
return if method_e?
method_d
end
def method_d
"d"
end
def method_b
return if method_e?
method_c
end
def method_c
"c"
end
def method_e?
true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment