Skip to content

Instantly share code, notes, and snippets.

@gjohnson
Created January 19, 2014 04:46
Show Gist options
  • Save gjohnson/8500578 to your computer and use it in GitHub Desktop.
Save gjohnson/8500578 to your computer and use it in GitHub Desktop.
ohhhhhhhh yeah
def self.method_missing(method, *args, &block)
attr = method.to_s.sub(/=$/, '').to_sym
return super unless user_config.key?(attr)
if method =~ /=$/
set(attr, args.first)
else
get(attr)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment