Module: ScoringRules::ClassMethods

Defined in:
lib/scoring_rules.rb

Instance Method Summary collapse

Instance Method Details

#scoring_rules {|self.ruleset| ... } ⇒ Object

Yields:

  • (self.ruleset)

Raises:

  • (ArgumentError)


8
9
10
11
12
# File 'lib/scoring_rules.rb', line 8

def scoring_rules
  raise(ArgumentError, "You must supply a block with the rules") unless block_given?
  self.ruleset = Ruleset.new
  yield self.ruleset
end