Class: Confinement::Content
- Inherits:
-
Object
- Object
- Confinement::Content
- Includes:
- Blob, RenderableBlob, RouteableBlob
- Defined in:
- lib/confinement.rb
Instance Attribute Summary collapse
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#locals ⇒ Object
Returns the value of attribute locals.
Attributes included from RenderableBlob
Attributes included from RouteableBlob
Attributes included from Blob
Instance Method Summary collapse
- #body ⇒ Object
- #frontmatter ⇒ Object
-
#initialize(input_path:, layout: nil, locals: {}, renderers: :guess) ⇒ Content
constructor
A new instance of Content.
Constructor Details
#initialize(input_path:, layout: nil, locals: {}, renderers: :guess) ⇒ Content
Returns a new instance of Content.
445 446 447 448 449 450 451 |
# File 'lib/confinement.rb', line 445 def initialize(input_path:, layout: nil, locals: {}, renderers: :guess) self.input_path = input_path self.layout = layout self.locals = locals self.renderers = renderers end |
Instance Attribute Details
#layout ⇒ Object
Returns the value of attribute layout.
454 455 456 |
# File 'lib/confinement.rb', line 454 def layout @layout end |
#locals ⇒ Object
Returns the value of attribute locals.
453 454 455 |
# File 'lib/confinement.rb', line 453 def locals @locals end |
Instance Method Details
#body ⇒ Object
456 457 458 459 |
# File 'lib/confinement.rb', line 456 def body parse_body_and_frontmatter @body end |
#frontmatter ⇒ Object
461 462 463 464 |
# File 'lib/confinement.rb', line 461 def frontmatter parse_body_and_frontmatter @frontmatter end |