Class: Valideizer::Holder

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeHolder

Returns a new instance of Holder.



20
21
22
# File 'lib/valideizer/holder.rb', line 20

def initialize
  @valideizers = {}
end

Instance Attribute Details

#callback_controllerObject

Returns the value of attribute callback_controller.



13
14
15
# File 'lib/valideizer/holder.rb', line 13

def callback_controller
  @callback_controller
end

#callback_methodObject

Returns the value of attribute callback_method.



12
13
14
# File 'lib/valideizer/holder.rb', line 12

def callback_method
  @callback_method
end

#output_typeObject

Returns the value of attribute output_type.



17
18
19
# File 'lib/valideizer/holder.rb', line 17

def output_type
  @output_type
end

#render_blockObject

Returns the value of attribute render_block.



16
17
18
# File 'lib/valideizer/holder.rb', line 16

def render_block
  @render_block
end

#render_controllerObject

Returns the value of attribute render_controller.



15
16
17
# File 'lib/valideizer/holder.rb', line 15

def render_controller
  @render_controller
end

#render_methodObject

Returns the value of attribute render_method.



14
15
16
# File 'lib/valideizer/holder.rb', line 14

def render_method
  @render_method
end

#statusObject

Returns the value of attribute status.



18
19
20
# File 'lib/valideizer/holder.rb', line 18

def status
  @status
end

#valideizersObject

Returns the value of attribute valideizers.



11
12
13
# File 'lib/valideizer/holder.rb', line 11

def valideizers
  @valideizers
end

Instance Method Details

#raise_exceptionObject



24
25
26
# File 'lib/valideizer/holder.rb', line 24

def raise_exception
  raise "You've already defined #{@output_type}"
end