Class: TurboReflex::ControllerPack

Inherits:
Object
  • Object
show all
Defined in:
lib/turbo_reflex/controller_pack.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller) ⇒ ControllerPack

Returns a new instance of ControllerPack.



25
26
27
28
29
# File 'lib/turbo_reflex/controller_pack.rb', line 25

def initialize(controller)
  @controller = controller
  @runner = TurboReflex::Runner.new(controller)
  @reflex = runner.reflex_instance
end

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller.



6
7
8
# File 'lib/turbo_reflex/controller_pack.rb', line 6

def controller
  @controller
end

#reflexObject (readonly)

Returns the value of attribute reflex.



6
7
8
# File 'lib/turbo_reflex/controller_pack.rb', line 6

def reflex
  @reflex
end

#runnerObject (readonly)

Returns the value of attribute runner.



6
7
8
# File 'lib/turbo_reflex/controller_pack.rb', line 6

def runner
  @runner
end

Instance Method Details

#errored?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/turbo_reflex/controller_pack.rb', line 39

def errored?
  runner.reflex_errored?
end

#performed?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/turbo_reflex/controller_pack.rb', line 35

def performed?
  runner.reflex_performed?
end

#renderObject



43
44
45
# File 'lib/turbo_reflex/controller_pack.rb', line 43

def render(...)
  reflex.render_response(...)
end

#requested?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/turbo_reflex/controller_pack.rb', line 31

def requested?
  runner.reflex_requested?
end