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

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

#definition(expr, evaluator = nil, &block) ⇒ Object



26
27
28
# File 'lib/sfn/lint/rule_set.rb', line 26

def definition(expr, evaluator = nil, &block)
  items << Sfn::Lint::Definition.new(expr, provider, evaluator, &block)
end

#fail_message(val = nil) ⇒ Object



30
31
32
33
34
35
# File 'lib/sfn/lint/rule_set.rb', line 30

def fail_message(val = nil)
  unless val.nil?
    @fail_message = val
  end
  @fail_message
end