class Cubic::Generator::Gemfile
Creates a Gemfiles in the root directory of the generated application.
Public Instance Methods
design()
click to toggle source
Creates a hash that will be used for file generation purposes
# File lib/cubic/generators/gemfile.rb, line 7 def design group = ['source "https://rubygems.org"', 'gem "sinatra"', 'gem "rake"', 'gem "sequel"', 'gem "haml"'] gems = [Config[:gems], Config[:orm], Config[:db]].flatten.compact gems.map! { |gem| "gem '#{gem}'" } @files << { name: 'Gemfile', path: '/', content: gems.unshift(group).flatten!.join("\n") } end