Class: DYAutomate::Command
- Inherits:
-
CLAide::Command
- Object
- CLAide::Command
- DYAutomate::Command
- Defined in:
- lib/DYAutomate/Command.rb,
lib/DYAutomate/Command/pod.rb,
lib/DYAutomate/Command/dgit.rb,
lib/DYAutomate/Command/Pod/push.rb,
lib/DYAutomate/Command/taskFlow.rb,
lib/DYAutomate/Command/workspace.rb,
lib/DYAutomate/Command/Git/tagAdd.rb,
lib/DYAutomate/Command/Pod/version.rb,
lib/DYAutomate/Command/codeSnippet.rb,
lib/DYAutomate/Command/codeGenerate.rb,
lib/DYAutomate/Command/TaksFlow/test.rb,
lib/DYAutomate/Command/Workspace/update.rb,
lib/DYAutomate/Command/Workspace/install.rb
Direct Known Subclasses
Defined Under Namespace
Classes: CodeGenerate, CodeSnippet, Git, Pod, TaskFlow, WorkSpace
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#env_str ⇒ Object
Returns the value of attribute env_str.
-
#repo_name ⇒ Object
Returns the value of attribute repo_name.
Instance Method Summary collapse
-
#initialize(argv) ⇒ Command
constructor
self.plugin_prefixes = %w(claide DYAutomate).
- #pp(msg, level = 2) ⇒ Object
-
#run ⇒ Object
def self.options [ [‘–silent’, ‘Show nothing’], ].concat(super) end.
Constructor Details
#initialize(argv) ⇒ Command
self.plugin_prefixes = %w(claide DYAutomate)
27 28 29 30 31 32 |
# File 'lib/DYAutomate/Command.rb', line 27 def initialize(argv) super @config = DYAutomateConfig.loadConfig @env_str = @config.detailObj.env_str if @config @repoName = @config.detailObj.private_repo_name if @config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
15 16 17 |
# File 'lib/DYAutomate/Command.rb', line 15 def config @config end |
#env_str ⇒ Object
Returns the value of attribute env_str.
16 17 18 |
# File 'lib/DYAutomate/Command.rb', line 16 def env_str @env_str end |
#repo_name ⇒ Object
Returns the value of attribute repo_name.
17 18 19 |
# File 'lib/DYAutomate/Command.rb', line 17 def repo_name @repo_name end |
Instance Method Details
#pp(msg, level = 2) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/DYAutomate/Command.rb', line 44 def pp(msg,level = 2) unless msg return end if level == 1 puts msg.white if msg elsif level == 2 puts msg.red if msg end end |
#run ⇒ Object
def self.options
[
['--silent', 'Show nothing'],
].concat(super)
end
40 41 42 |
# File 'lib/DYAutomate/Command.rb', line 40 def run pp('automate works!!',1) end |