Class: Gct::Command::Op::Gems
Instance Method Summary
collapse
#auto_add_tag, #check_branch_can_be_update, #config_gitlab, #current_branch, #file_contents, #get_project, #gitlab_error, options, run
Constructor Details
#initialize(argv) ⇒ Gems
Returns a new instance of Gems.
14
15
16
|
# File 'lib/gct/command/op/gems.rb', line 14
def initialize(argv)
super
end
|
Instance Method Details
#openGems ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/gct/command/op/gems.rb', line 26
def openGems
last_version_file = "0"
Dir.foreach('/Library/Ruby/Gems/') do |file|
if file.to_s > last_version_file
last_version_file = file.to_s
end
end
version = last_version_file
path = "/Library/Ruby/Gems/#{version}/gems"
puts "gem路径为:#{path}".green
system "open #{path}"
end
|
#run ⇒ Object
22
23
24
|
# File 'lib/gct/command/op/gems.rb', line 22
def run
openGems
end
|
#validate! ⇒ Object
18
19
20
|
# File 'lib/gct/command/op/gems.rb', line 18
def validate!
super
end
|