Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is .tt file in ruby

In bundler/bundler & rails/rails project, there are some *.tt files (Go to the project page, click t then type .tt). Inside this kind of file, it could use ERB. Example of a .tt file (from bundler):

source 'https://rubygems.org'

# Specify your gem's dependencies in <%=config[:name]%>.gemspec
gemspec

What are these .tt files? Where are they from?

like image 626
Juanito Fatas Avatar asked May 01 '14 03:05

Juanito Fatas


1 Answers

They're Thor template files.

The .tt could be any file extension you want. It is just because they pick .tt as file extension. See Thor::Actions#template to learn more.

A Real world example from bundler.

like image 133
Juanito Fatas Avatar answered Sep 22 '22 06:09

Juanito Fatas