Created
March 21, 2013 15:53
-
-
Save dalen/5214129 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def initialize(fact = nil, *values, &block) | |
unless block_given? then | |
raise ArgumentError, "The fact name must be provided" unless fact | |
raise ArgumentError, "One or more values or a block must be provided" if values.empty? | |
@fact = fact | |
@values = values | |
end | |
@block = block | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment