Class: Phlex::Reactive::ActionContext

Inherits:
Data
  • Object
show all
Defined in:
lib/phlex/reactive.rb

Overview

What a component-aware around_action wrapper sees (issue #112). Frozen: a wrapper OBSERVES the resolved action — it must not mutate the context to widen invokability (the token verify, component resolution, default-deny, and schema coercion have already run and are not negotiable here).

  • component — the resolved, identity-rebuilt component instance
  • action_name — the declared action Symbol about to run
  • params — the SCHEMA-COERCED params (dropped keys already gone)
  • request — the ActionDispatch::Request (remote_ip, headers, ...)

Instance Attribute Summary collapse

Instance Attribute Details

#action_nameObject (readonly)

Returns the value of attribute action_name

Returns:

  • (Object)

    the current value of action_name



110
111
112
# File 'lib/phlex/reactive.rb', line 110

def action_name
  @action_name
end

#componentObject (readonly)

Returns the value of attribute component

Returns:

  • (Object)

    the current value of component



110
111
112
# File 'lib/phlex/reactive.rb', line 110

def component
  @component
end

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



110
111
112
# File 'lib/phlex/reactive.rb', line 110

def params
  @params
end

#requestObject (readonly)

Returns the value of attribute request

Returns:

  • (Object)

    the current value of request



110
111
112
# File 'lib/phlex/reactive.rb', line 110

def request
  @request
end