class Majic::Generator
Public Instance Methods
name()
click to toggle source
Return the name.
# File library/majic/generator.rb, line 27 def name @name end
project(name)
click to toggle source
# File library/majic/generator.rb, line 14 def project name @name = name directory 'templates/project', name inside name do run "bundle install" run "git init" end end
underscore_name()
click to toggle source
Return the undercase version of the name.
# File library/majic/generator.rb, line 32 def underscore_name @name.underscore end
user_email_address()
click to toggle source
Return the users e-mail address (relies on `git config`)!
# File library/majic/generator.rb, line 42 def user_email_address %x{git config --global --get user.email}.strip end
user_full_name()
click to toggle source
Return the users full name (relies on `git config`)!
# File library/majic/generator.rb, line 37 def user_full_name %x{git config --global --get user.name}.strip end