Skip to content

Instantly share code, notes, and snippets.

View rolandobrown's full-sized avatar

Rolando Brown rolandobrown

View GitHub Profile
@rolandobrown
rolandobrown / group.rb
Last active August 29, 2015 14:26 — forked from panthomakos/group.rb
Improved Custom Error Messages in Ruby
class Group
module Error
class Standard < StandardError; end
class AlreadyAMember < Standard; end
class NotPermittedToJoin < Standard; end
end
def join user
raise Error::NotPermittedToJoin unless self.permitted?(user)
raise Error::AlreadyAMember if self.member?(user)
@rolandobrown
rolandobrown / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console