Class: Lite::Validation::Validator::Node::Suspended

Inherits:
Object
  • Object
show all
Defined in:
lib/lite/validation/validator/node/suspended.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action, node, path, from, *args) ⇒ Suspended

Returns a new instance of Suspended.



8
9
10
11
12
13
14
# File 'lib/lite/validation/validator/node/suspended.rb', line 8

def initialize(action, node, path, from, *args)
  @action = action
  @node = node
  @path = path
  @from = from
  @args = args
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



16
17
18
# File 'lib/lite/validation/validator/node/suspended.rb', line 16

def action
  @action
end

#argsObject (readonly)

Returns the value of attribute args.



16
17
18
# File 'lib/lite/validation/validator/node/suspended.rb', line 16

def args
  @args
end

#fromObject (readonly)

Returns the value of attribute from.



16
17
18
# File 'lib/lite/validation/validator/node/suspended.rb', line 16

def from
  @from
end

#nodeObject (readonly)

Returns the value of attribute node.



16
17
18
# File 'lib/lite/validation/validator/node/suspended.rb', line 16

def node
  @node
end

#pathObject (readonly)

Returns the value of attribute path.



16
17
18
# File 'lib/lite/validation/validator/node/suspended.rb', line 16

def path
  @path
end

Instance Method Details

#option(&block) ⇒ Object



18
19
20
# File 'lib/lite/validation/validator/node/suspended.rb', line 18

def option(&block)
  node.send(action, path, from, :yield_option, *args, block)
end

#some(&block) ⇒ Object



22
23
24
# File 'lib/lite/validation/validator/node/suspended.rb', line 22

def some(&block)
  node.send(action, path, from, :skip, *args, block)
end

#some_or_nil(&block) ⇒ Object



26
27
28
# File 'lib/lite/validation/validator/node/suspended.rb', line 26

def some_or_nil(&block)
  node.send(action, path, from, :nullify, *args, block)
end