Sha256: 5ac5603f6a3504ec5fa662c1d7da173644f44b7ea8d36be15a341160791162ba

Contents?: true

Size: 695 Bytes

Versions: 14

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

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

module EhbrsRubyUtils
  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|
            ::EhbrsRubyUtils::CookingBook::Recipe::Ingredient.build(label, value)
          end
        end

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ehbrs_ruby_utils-0.44.3 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.44.2 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.44.1 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.44.0 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.41.1 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.41.0 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.40.0 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.39.0 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.38.0 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.37.0 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.36.1 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.36.0 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.35.0 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb
ehbrs_ruby_utils-0.33.0 lib/ehbrs_ruby_utils/cooking_book/recipe/part.rb