Class: TerraBoi::DockerfileGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/terra_boi/dockerfile_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#application_nameObject

Returns the value of attribute application_name.



5
6
7
# File 'lib/generators/terra_boi/dockerfile_generator.rb', line 5

def application_name
  @application_name
end

#class_optionsObject

Returns the value of attribute class_options.



5
6
7
# File 'lib/generators/terra_boi/dockerfile_generator.rb', line 5

def class_options
  @class_options
end

Instance Method Details

#create_dockerfileObject



24
25
26
27
# File 'lib/generators/terra_boi/dockerfile_generator.rb', line 24

def create_dockerfile
	template "Dockerfile.erb", "Dockerfile"
	template ".dockerignore.erb", ".dockerignore"
end

#initObject



19
20
21
22
# File 'lib/generators/terra_boi/dockerfile_generator.rb', line 19

def init
	self.application_name = generate_application_name
	self.class_options = options
end