Class: DYAutomate::Command::Git

Inherits:
DYAutomate::Command show all
Defined in:
lib/DYAutomate/Command/dgit.rb,
lib/DYAutomate/Command/Git/tagAdd.rb

Direct Known Subclasses

TagAdd

Defined Under Namespace

Classes: TagAdd

Instance Attribute Summary collapse

Attributes inherited from DYAutomate::Command

#config, #env_str, #repo_name

Instance Method Summary collapse

Methods inherited from DYAutomate::Command

#pp

Constructor Details

#initialize(argv) ⇒ Git

Returns a new instance of Git.



22
23
24
# File 'lib/DYAutomate/Command/dgit.rb', line 22

def initialize(argv)
  super
end

Instance Attribute Details

#git_objObject

#查询结果lib信息



20
21
22
# File 'lib/DYAutomate/Command/dgit.rb', line 20

def git_obj
  @git_obj
end

#pathObject

路径



18
19
20
# File 'lib/DYAutomate/Command/dgit.rb', line 18

def path
  @path
end

Instance Method Details

#existGit?Boolean

Returns:

  • (Boolean)


41
42
43
44
# File 'lib/DYAutomate/Command/dgit.rb', line 41

def existGit?
    @git_obj = Git.new(Dir.pwd)
    @git_obj
end

#runObject



37
38
39
# File 'lib/DYAutomate/Command/dgit.rb', line 37

def run
  pp('git run ...',1)
end

#validate!Object



26
27
28
29
30
31
32
33
34
35
# File 'lib/DYAutomate/Command/dgit.rb', line 26

def validate!
  super
  # unless @name
  #   help! 'need the lib `NAME`.'
  # end

  unless existGit?
    help! "at #{Dir.pwd},is not git"
  end
end