Class: Phlex::Reactive::Component::ActionDefinition

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

Overview

A declared, client-invokable action and its param schema. params keeps the RAW declared hash (the readable form callers/specs inspect); schema is the compiled Phlex::Reactive::ParamSchema (issue #109) the endpoint coerces through — built ONCE at declaration so a typo'd type symbol raises Phlex::Reactive::UnknownParamType at class load, not at click time.

Named ActionDefinition (issue #233), NOT Action: this module sits in every reactive component's ancestry, so a bare Action constant shadows a host app's Phlex kit component of the same name under lazy autoloading (Kit's LazyLoader resolves through the calling class's const_get). Keep every constant here suffixed / implausible as a kit component name — and never alias the old name back.

Instance Attribute Summary collapse

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



94
95
96
# File 'lib/phlex/reactive/component.rb', line 94

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



94
95
96
# File 'lib/phlex/reactive/component.rb', line 94

def params
  @params
end

#schemaObject (readonly)

Returns the value of attribute schema

Returns:

  • (Object)

    the current value of schema



94
95
96
# File 'lib/phlex/reactive/component.rb', line 94

def schema
  @schema
end