Sha256: 736809141b65f1ecd385b7849ab68e04060b21ca2bf1c274a73fdd45fad0386e

Contents?: true

Size: 666 Bytes

Versions: 26

Compression:

Stored size: 666 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'
require 'eac_ruby_utils/yaml'
require 'ehbrs/cooking_book/recipe/ingredient'

module Ehbrs
  module CookingBook
    class Recipe
      class Part
        enable_simple_cache
        common_constructor :title, :source_data

        def notes
          source_data[:notes]
        end

        private

        def ingredients_uncached
          source_data.fetch(:ingredients).map do |label, value|
            ::Ehbrs::CookingBook::Recipe::Ingredient.build(label, value)
          end
        end

        def steps_uncached
          source_data.fetch(:steps)
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ehbrs-tools-0.35.1 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.35.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.34.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.33.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.32.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.31.1 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.31.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.30.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.29.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.28.3 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.28.2 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.28.1 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.28.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.27.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.26.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.25.1 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.25.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.24.0 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.23.1 lib/ehbrs/cooking_book/recipe/part.rb
ehbrs-tools-0.23.0 lib/ehbrs/cooking_book/recipe/part.rb