Sha256: 1bb46245df498b3f7e0acf77210535d06734803e7db9ac897984a74b0ef08ea8

Contents?: true

Size: 662 Bytes

Versions: 9

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

require "refinements/structs"

module Hanamismith
  module Builders
    # Builds project skeleton Progressive Web Application (PWA) manifest.
    class PWA
      using Refinements::Structs

      def self.call(...) = new(...).call

      def initialize configuration, builder: Rubysmith::Builder
        @configuration = configuration
        @builder = builder
      end

      def call
        path = "%project_name%/public/manifest.webmanifest.erb"
        builder.call(configuration.merge(template_path: path)).render
        configuration
      end

      private

      attr_reader :configuration, :builder
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hanamismith-0.22.1 lib/hanamismith/builders/pwa.rb
hanamismith-0.22.0 lib/hanamismith/builders/pwa.rb
hanamismith-0.21.0 lib/hanamismith/builders/pwa.rb
hanamismith-0.20.0 lib/hanamismith/builders/pwa.rb
hanamismith-0.19.0 lib/hanamismith/builders/pwa.rb
hanamismith-0.18.0 lib/hanamismith/builders/pwa.rb
hanamismith-0.17.1 lib/hanamismith/builders/pwa.rb
hanamismith-0.17.0 lib/hanamismith/builders/pwa.rb
hanamismith-0.16.0 lib/hanamismith/builders/pwa.rb