Class: Rails::Surrender::Render::Configuration
- Inherits:
-
Object
- Object
- Rails::Surrender::Render::Configuration
- Includes:
- InclusionMapperLogic, InstanceLogic
- Defined in:
- lib/rails/surrender/render/configuration.rb,
lib/rails/surrender/render/configuration/instance_logic.rb,
lib/rails/surrender/render/configuration/inclusion_mapper_logic.rb
Overview
Container for config structure when rendering or generating the inclusion object.
Defined Under Namespace
Modules: InclusionMapperLogic, InstanceLogic Classes: Element
Instance Attribute Summary collapse
-
#ctrl_exclude ⇒ Object
Returns the value of attribute ctrl_exclude.
-
#ctrl_include ⇒ Object
Returns the value of attribute ctrl_include.
-
#history ⇒ Object
Returns the value of attribute history.
-
#reload_resource ⇒ Object
(also: #reload_resource?)
Returns the value of attribute reload_resource.
-
#resource_class ⇒ Object
Returns the value of attribute resource_class.
-
#user_exclude ⇒ Object
Returns the value of attribute user_exclude.
-
#user_include ⇒ Object
Returns the value of attribute user_include.
Instance Method Summary collapse
-
#initialize(resource_class: nil, reload_resource: false, user_exclude: [], user_include: [], ctrl_exclude: [], ctrl_include: [], history: []) ⇒ Configuration
constructor
A new instance of Configuration.
Methods included from InstanceLogic
#exclude_locally?, #locally_included_attributes, #locally_included_expands, #nested_ctrl_excludes, #nested_ctrl_includes, #nested_user_excludes, #nested_user_includes
Methods included from InclusionMapperLogic
Constructor Details
#initialize(resource_class: nil, reload_resource: false, user_exclude: [], user_include: [], ctrl_exclude: [], ctrl_include: [], history: []) ⇒ Configuration
Returns a new instance of Configuration.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/rails/surrender/render/configuration.rb', line 26 def initialize( resource_class: nil, reload_resource: false, user_exclude: [], user_include: [], ctrl_exclude: [], ctrl_include: [], history: [] ) @resource_class = resource_class @reload_resource = reload_resource @user_exclude = user_exclude.compact @user_include = user_include @ctrl_exclude = ctrl_exclude.compact @ctrl_include = ctrl_include @history = history validate_user_includes! end |
Instance Attribute Details
#ctrl_exclude ⇒ Object
Returns the value of attribute ctrl_exclude.
14 15 16 |
# File 'lib/rails/surrender/render/configuration.rb', line 14 def ctrl_exclude @ctrl_exclude end |
#ctrl_include ⇒ Object
Returns the value of attribute ctrl_include.
14 15 16 |
# File 'lib/rails/surrender/render/configuration.rb', line 14 def ctrl_include @ctrl_include end |
#history ⇒ Object
Returns the value of attribute history.
14 15 16 |
# File 'lib/rails/surrender/render/configuration.rb', line 14 def history @history end |
#reload_resource ⇒ Object Also known as: reload_resource?
Returns the value of attribute reload_resource.
14 15 16 |
# File 'lib/rails/surrender/render/configuration.rb', line 14 def reload_resource @reload_resource end |
#resource_class ⇒ Object
Returns the value of attribute resource_class.
14 15 16 |
# File 'lib/rails/surrender/render/configuration.rb', line 14 def resource_class @resource_class end |
#user_exclude ⇒ Object
Returns the value of attribute user_exclude.
14 15 16 |
# File 'lib/rails/surrender/render/configuration.rb', line 14 def user_exclude @user_exclude end |
#user_include ⇒ Object
Returns the value of attribute user_include.
14 15 16 |
# File 'lib/rails/surrender/render/configuration.rb', line 14 def user_include @user_include end |