Sha256: 289bf5bff6e23c34b3048c973ee0668286127d036cb99d6d6f23c21e50c1688e

Contents?: true

Size: 546 Bytes

Versions: 12

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true

require "pakyow/generator"

module Pakyow
  # @api private
  module Generators
    class Presenter < Generator
      def self.source_root
        File.expand_path("../", __FILE__)
      end

      argument :app
      argument :name
      argument :view_path

      def create_presenter
        template("templates/presenter.rb.tt", File.join(app.config.src, "presenters/#{name}_presenter.rb"))
      end

      protected

      def normalized_view_path
        File.join("/", view_path)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pakyow-presenter-1.0.6 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.5 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.4 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.3 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.2 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.1 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.0 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.0.rc5 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.0.rc4 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.0.rc3 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.0.rc2 lib/pakyow/generators/presenter/presenter_generator.rb
pakyow-presenter-1.0.0.rc1 lib/pakyow/generators/presenter/presenter_generator.rb