Sha256: be7564b069c8903e42298df0b84eb3e4e093e34008ac9db0d21c39df87b23d2e

Contents?: true

Size: 790 Bytes

Versions: 15

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 = 'ST'
      @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

15 entries across 15 versions & 1 rubygems

Version Path
cocoapods-ykutility-3.0.4 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-3.0.3 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-3.0.2 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-3.0.1 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-3.0.0 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.9 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.8 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.7 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.6 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.5 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.4 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.3 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.2 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.1 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
cocoapods-ykutility-2.0.0 lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb