Skip to content

Instantly share code, notes, and snippets.

@davetron5000
Created February 27, 2012 20:28
Show Gist options
  • Save davetron5000/1926819 to your computer and use it in GitHub Desktop.
Save davetron5000/1926819 to your computer and use it in GitHub Desktop.
This would be handy
module Kernel
def why?(&block)
warn "There is code in #{__FILE__}:#{__LINE__} that needs explanation"
block.call
end
ene
class Person
attr_reader :name
attr_reader :age
def initialize(name,age)
@name = name
@age = age
end
def minor?
why? {
age < 19
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment