Class: Alchemy::JsonApi::Page
- Inherits:
-
BaseRecord
- Object
- BaseRecord
- Alchemy::JsonApi::Page
- Defined in:
- app/models/alchemy/json_api/page.rb
Instance Method Summary collapse
- #element_ids ⇒ Object
-
#elements ⇒ Object
The top level public, non-fixed elements of this page that - if present - contains their nested_elements.
- #fixed_element_ids ⇒ Object
-
#fixed_elements ⇒ Object
The top level public, fixed elements of this page that - if present - contains their nested_elements.
Instance Method Details
#element_ids ⇒ Object
35 36 37 |
# File 'app/models/alchemy/json_api/page.rb', line 35 def element_ids @_element_ids ||= elements.map(&:id) end |
#elements ⇒ Object
The top level public, non-fixed elements of this page that - if present - contains their nested_elements.
25 26 27 |
# File 'app/models/alchemy/json_api/page.rb', line 25 def elements @_elements ||= first_level_elements.reject(&:fixed?) end |
#fixed_element_ids ⇒ Object
39 40 41 |
# File 'app/models/alchemy/json_api/page.rb', line 39 def fixed_element_ids @_fixed_element_ids ||= fixed_elements.map(&:id) end |
#fixed_elements ⇒ Object
The top level public, fixed elements of this page that - if present - contains their nested_elements.
31 32 33 |
# File 'app/models/alchemy/json_api/page.rb', line 31 def fixed_elements @_fixed_elements ||= first_level_elements.select(&:fixed?) end |