Sha256: 454832b831e1873f8724cc2f4a82fd9565c32594be20280c6b863e8633c1969c
Contents?: true
Size: 790 Bytes
Versions: 4
Compression:
Stored size: 790 Bytes
Contents
# frozen_string_literal: true module YKPod class YKCreatePodConfig attr_accessor :name, :language, :with_demo, :with_register, :author, :author_email, :prefix, :path def initialize @name = '' @language = '' @with_demo = true @with_register = false user_name = open('|git config --global user.name').gets user_name = user_name.blank? ? 'xxximac' : user_name user_email = open('|git config --global user.email').gets user_email = user_email.blank? ? 'xxx@xxx.com' : user_email @author = user_name.strip.gsub('.', '') @author_email = user_email.strip @prefix = 'YK' @path = File.expand_path(Dir.getwd.to_s) end def prefix_name name.start_with?(prefix) ? name : prefix + name end end end
Version data entries
4 entries across 4 versions & 1 rubygems