Class: Tram::Page::Section
- Inherits:
-
Object
- Object
- Tram::Page::Section
- Extended by:
- Dry::Initializer
- Defined in:
- lib/tram/page/section.rb
Overview
Contains class-level definition (name and options) for a section with a method [#call] that extracts the section part of hash from an instance of [Tram::Page]
Instance Method Summary collapse
-
#call(page) ⇒ Hash
A part of the section.
Instance Method Details
#call(page) ⇒ Hash
Returns a part of the section.
19 20 21 |
# File 'lib/tram/page/section.rb', line 19 def call(page) skip_on?(page) ? {} : { name => value_at(page) } end |