class Veto::Checker
Public Class Methods
from_children(children=[])
click to toggle source
# File lib/veto/blocks/checker.rb, line 3 def self.from_children(children=[]) inst = new children.each{|child| inst << child } inst end
new(&block)
click to toggle source
Calls superclass method
Veto::Block::new
# File lib/veto/blocks/checker.rb, line 9 def initialize(&block) super instance_eval(&block) if block_given? end
Public Instance Methods
validate(*args)
click to toggle source
# File lib/veto/blocks/checker.rb, line 18 def validate(*args) self << ValidateBlock.build(*args) end
validates(*args)
click to toggle source
# File lib/veto/blocks/checker.rb, line 14 def validates(*args) self << ValidatesBlock.build(*args) end
with_options(*args, &block)
click to toggle source
# File lib/veto/blocks/checker.rb, line 22 def with_options(*args, &block) b = WithOptionsBlock.build(*args) b << self.class.new(&block) self << b end