Class: Valideizer::Holder
- Inherits:
-
Object
- Object
- Valideizer::Holder
- Includes:
- Singleton
- Defined in:
- lib/valideizer/holder.rb
Constant Summary collapse
- CALLBACK_TYPE =
'callback'.freeze
- METHOD_TYPE =
'render_method'.freeze
- RENDER_TYPE =
'render_block'.freeze
Instance Attribute Summary collapse
-
#callback_controller ⇒ Object
Returns the value of attribute callback_controller.
-
#callback_method ⇒ Object
Returns the value of attribute callback_method.
-
#output_type ⇒ Object
Returns the value of attribute output_type.
-
#render_block ⇒ Object
Returns the value of attribute render_block.
-
#render_controller ⇒ Object
Returns the value of attribute render_controller.
-
#render_method ⇒ Object
Returns the value of attribute render_method.
-
#status ⇒ Object
Returns the value of attribute status.
-
#valideizers ⇒ Object
Returns the value of attribute valideizers.
Instance Method Summary collapse
-
#initialize ⇒ Holder
constructor
A new instance of Holder.
- #raise_exception ⇒ Object
Constructor Details
#initialize ⇒ Holder
Returns a new instance of Holder.
20 21 22 |
# File 'lib/valideizer/holder.rb', line 20 def initialize @valideizers = {} end |
Instance Attribute Details
#callback_controller ⇒ Object
Returns the value of attribute callback_controller.
13 14 15 |
# File 'lib/valideizer/holder.rb', line 13 def callback_controller @callback_controller end |
#callback_method ⇒ Object
Returns the value of attribute callback_method.
12 13 14 |
# File 'lib/valideizer/holder.rb', line 12 def callback_method @callback_method end |
#output_type ⇒ Object
Returns the value of attribute output_type.
17 18 19 |
# File 'lib/valideizer/holder.rb', line 17 def output_type @output_type end |
#render_block ⇒ Object
Returns the value of attribute render_block.
16 17 18 |
# File 'lib/valideizer/holder.rb', line 16 def render_block @render_block end |
#render_controller ⇒ Object
Returns the value of attribute render_controller.
15 16 17 |
# File 'lib/valideizer/holder.rb', line 15 def render_controller @render_controller end |
#render_method ⇒ Object
Returns the value of attribute render_method.
14 15 16 |
# File 'lib/valideizer/holder.rb', line 14 def render_method @render_method end |
#status ⇒ Object
Returns the value of attribute status.
18 19 20 |
# File 'lib/valideizer/holder.rb', line 18 def status @status end |
#valideizers ⇒ Object
Returns the value of attribute valideizers.
11 12 13 |
# File 'lib/valideizer/holder.rb', line 11 def valideizers @valideizers end |
Instance Method Details
#raise_exception ⇒ Object
24 25 26 |
# File 'lib/valideizer/holder.rb', line 24 def raise_exception raise "You've already defined #{@output_type}" end |