Sha256: d91a8dfe6d4f33d31c1c40cc194833ce213bf45c0f7adbf8d0704dc5f0b60e9f

Contents?: true

Size: 576 Bytes

Versions: 6

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'
require 'ehbrs/cooking_book/build/base_page'

module Ehbrs
  module CookingBook
    class Build
      class RecipePage < ::Ehbrs::CookingBook::Build::BasePage
        def target_basename
          title.variableize
        end

        def parts
          @parts ||= super.map { |e| Part.new(e) }
        end

        class Part < SimpleDelegator
          def content
            ::Ehbrs::CookingBook::Build::RecipePage.erb_template('part.html.erb', self)
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ehbrs-tools-0.35.1 lib/ehbrs/cooking_book/build/recipe_page.rb
ehbrs-tools-0.35.0 lib/ehbrs/cooking_book/build/recipe_page.rb
ehbrs-tools-0.34.0 lib/ehbrs/cooking_book/build/recipe_page.rb
ehbrs-tools-0.33.0 lib/ehbrs/cooking_book/build/recipe_page.rb
ehbrs-tools-0.32.0 lib/ehbrs/cooking_book/build/recipe_page.rb
ehbrs-tools-0.31.1 lib/ehbrs/cooking_book/build/recipe_page.rb