Class: CloneGitFile::Cloner
- Inherits:
-
Object
- Object
- CloneGitFile::Cloner
- Defined in:
- lib/clone_git_file.rb
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ Cloner
constructor
A new instance of Cloner.
- #open_file ⇒ Object
Constructor Details
#initialize(file, options = {}) ⇒ Cloner
Returns a new instance of Cloner.
6 7 8 9 |
# File 'lib/clone_git_file.rb', line 6 def initialize(file, = {}) @file = file.gsub("%20", " ") @options = end |
Instance Method Details
#open_file ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/clone_git_file.rb', line 11 def open_file if Dir.exists?(File.(local_repo_path)) update_repo else clone_repo end if @options[:open_in_editor] || @options[:output_run_command_to_terminal] launch_editor else print_clone_location end end |