Class: YKPod::YKCreatePodConfig
- Inherits:
-
Object
- Object
- YKPod::YKCreatePodConfig
- Defined in:
- lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#author_email ⇒ Object
Returns the value of attribute author_email.
-
#language ⇒ Object
Returns the value of attribute language.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#with_demo ⇒ Object
Returns the value of attribute with_demo.
-
#with_register ⇒ Object
Returns the value of attribute with_register.
Instance Method Summary collapse
-
#initialize ⇒ YKCreatePodConfig
constructor
A new instance of YKCreatePodConfig.
- #prefix_name ⇒ Object
Constructor Details
#initialize ⇒ YKCreatePodConfig
Returns a new instance of YKCreatePodConfig.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 7 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? ? '[email protected]' : user_email @author = user_name.strip.gsub('.', '') @author_email = user_email.strip @prefix = 'ST' @path = File.(Dir.getwd.to_s) end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
5 6 7 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 5 def @author end |
#author_email ⇒ Object
Returns the value of attribute author_email.
5 6 7 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 5 def @author_email end |
#language ⇒ Object
Returns the value of attribute language.
5 6 7 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 5 def language @language end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 5 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
5 6 7 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 5 def path @path end |
#prefix ⇒ Object
Returns the value of attribute prefix.
5 6 7 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 5 def prefix @prefix end |
#with_demo ⇒ Object
Returns the value of attribute with_demo.
5 6 7 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 5 def with_demo @with_demo end |
#with_register ⇒ Object
Returns the value of attribute with_register.
5 6 7 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 5 def with_register @with_register end |
Instance Method Details
#prefix_name ⇒ Object
23 24 25 |
# File 'lib/cocoapods-ykutility/command/create/yk_create_pod_config.rb', line 23 def prefix_name name.start_with?(prefix) ? name : prefix + name end |