Class: Vanguard::Rule::Nullary::Confirmation::Builder::Confirm
- Inherits:
-
Object
- Object
- Vanguard::Rule::Nullary::Confirmation::Builder::Confirm
- Includes:
- AbstractType, Adamantium::Flat
- Defined in:
- lib/vanguard/rule/nullary/confirmation.rb
Overview
Abstract base class for confirmation attribute name generators
Defined Under Namespace
Class Method Summary collapse
-
.build(value) ⇒ Confirm
private
Build confirm object.
Class Method Details
.build(value) ⇒ Confirm
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Build confirm object
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/vanguard/rule/nullary/confirmation.rb', line 43 def self.build(value) case value when value.respond_to?(:call) Block.new(value) when Symbol, String Static.new(value.to_sym) else raise "Cannot build confirm option from: #{value.inspect}" end end |