class Lively::Pages::Index

Attributes

body[R]
title[R]

Public Class Methods

new(title: "Lively", body: "Hello World") click to toggle source
# File lib/lively/pages/index.rb, line 7
def initialize(title: "Lively", body: "Hello World")
        @title = title
        @body = body
        
        path = File.expand_path("index.trenni", __dir__)
        @template = Trenni::Template.load_file(path)
end

Public Instance Methods

call() click to toggle source
# File lib/lively/pages/index.rb, line 18
def call
        @template.to_string(self)
end