Class: UpLoad
- Inherits:
-
Object
- Object
- UpLoad
- Defined in:
- lib/qiita_org/upload.rb
Instance Method Summary collapse
-
#initialize(src, option, os) ⇒ UpLoad
constructor
A new instance of UpLoad.
- #upload ⇒ Object
Constructor Details
#initialize(src, option, os) ⇒ UpLoad
Returns a new instance of UpLoad.
7 8 9 10 11 |
# File 'lib/qiita_org/upload.rb', line 7 def initialize(src, option, os) @src = src @option = (option == "qiita" || option == "open")? "public" : option @os = os end |
Instance Method Details
#upload ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/qiita_org/upload.rb', line 13 def upload() paths = GetFilePath.new(@src).get_file_path() unless paths.empty? showfile = ShowFile.new(paths, @src, @option, @os) showfile.open_file_dir() showfile.open_qiita() puts "Overwrite file URL's on #{@src}? (y/n)".green ans = STDIN.getch if ans == "y" showfile.input_url_to_org() end end end |