Skip to content

Instantly share code, notes, and snippets.

@dalen
Created March 21, 2013 15:53
Show Gist options
  • Save dalen/5214129 to your computer and use it in GitHub Desktop.
Save dalen/5214129 to your computer and use it in GitHub Desktop.
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