Class: DYAutomate::Command

Inherits:
CLAide::Command
  • Object
show all
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

CodeGenerate, CodeSnippet, Git, Pod, TaskFlow, WorkSpace

Defined Under Namespace

Classes: CodeGenerate, CodeSnippet, Git, Pod, TaskFlow, WorkSpace

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configObject

Returns the value of attribute config.



15
16
17
# File 'lib/DYAutomate/Command.rb', line 15

def config
  @config
end

#env_strObject

Returns the value of attribute env_str.



16
17
18
# File 'lib/DYAutomate/Command.rb', line 16

def env_str
  @env_str
end

#repo_nameObject

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

#runObject

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