Class: Sfn::Lint::RuleSet::Creator::RuleSet

Inherits:
Sfn::Lint::RuleSet::Creator show all
Defined in:
lib/sfn/lint/rule_set.rb

Instance Attribute Summary

Attributes inherited from Sfn::Lint::RuleSet::Creator

#items, #provider

Instance Method Summary collapse

Methods inherited from Sfn::Lint::RuleSet::Creator

#initialize

Constructor Details

This class inherits a constructor from Sfn::Lint::RuleSet::Creator

Instance Method Details

#rule(name, &block) ⇒ Object



18
19
20
21
22
# File 'lib/sfn/lint/rule_set.rb', line 18

def rule(name, &block)
  r = Rule.new(provider)
  r.instance_exec(&block)
  items << Sfn::Lint::Rule.new(name, r.items, r.fail_message, provider)
end