Skip to content

Instantly share code, notes, and snippets.

@codesword
Created June 5, 2016 14:14
Show Gist options
  • Save codesword/cef02cf31281ac243825564e4819263a to your computer and use it in GitHub Desktop.
Save codesword/cef02cf31281ac243825564e4819263a to your computer and use it in GitHub Desktop.
class Student
# ommitted
def fees(school)
send("#{school}_fees")
end
def method_missing(method_name)
return super unless /^.+_fees$/ =~ method_name
20000
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment