Class: Lite::Validation::Validator::Node::Suspended
- Inherits:
-
Object
- Object
- Lite::Validation::Validator::Node::Suspended
- Defined in:
- lib/lite/validation/validator/node/suspended.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(action, node, path, from, *args) ⇒ Suspended
constructor
A new instance of Suspended.
- #option(&block) ⇒ Object
- #some(&block) ⇒ Object
- #some_or_nil(&block) ⇒ Object
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
#action ⇒ Object (readonly)
Returns the value of attribute action.
16 17 18 |
# File 'lib/lite/validation/validator/node/suspended.rb', line 16 def action @action end |
#args ⇒ Object (readonly)
Returns the value of attribute args.
16 17 18 |
# File 'lib/lite/validation/validator/node/suspended.rb', line 16 def args @args end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
16 17 18 |
# File 'lib/lite/validation/validator/node/suspended.rb', line 16 def from @from end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
16 17 18 |
# File 'lib/lite/validation/validator/node/suspended.rb', line 16 def node @node end |
#path ⇒ Object (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 |