class Faat::Generators::Base

Public Class Methods

banner() click to toggle source
source_root() click to toggle source
# File lib/generators/faat.rb, line 6
def self.source_root
  @_faat_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'faat', generator_name, 'templates'))
end

Private Instance Methods

add_gem(name, options = {}) click to toggle source
# File lib/generators/faat.rb, line 16
def add_gem(name, options = {})
  gemfile_content = File.read(destination_path("Gemfile"))
  File.open(destination_path("Gemfile"), 'a') { |f| f.write("\n") } unless gemfile_content =~ /\n\Z/
  gem name, options unless gemfile_content.include? name
end
print_usage() click to toggle source