Sha256: 414ae29e45a0051e0f703aba770342ac9adb95ba1a0bfbc6532047ad5514200e

Contents?: true

Size: 393 Bytes

Versions: 4

Compression:

Stored size: 393 Bytes

Contents

# frozen_string_literal: true

module PicoApi
  module Generators
    module Commands
      class CreateTemplate < Base
        def call
          create_file
        end

        private

        def create_file
          File.open("#{project_name_snakecased}#{destination_path}", 'w') do |f|
            f.write(erb.result(get_binding))
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pico_api-0.0.4 lib/pico_api/generators/commands/create_template.rb
pico_api-0.0.3 lib/pico_api/generators/commands/create_template.rb
pico_api-0.0.2 lib/pico_api/generators/commands/create_template.rb
pico_api-0.0.1 lib/pico_api/generators/commands/create_template.rb