Module: TwitterBackup
- Defined in:
- lib/twitter_backup.rb,
lib/twitter_backup/ui.rb,
lib/twitter_backup/error.rb,
lib/twitter_backup/tweet.rb,
lib/twitter_backup/config.rb,
lib/twitter_backup/version.rb
Defined Under Namespace
Modules: Error, UI Classes: TBConfig, Tweet
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.prepare_file(file) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/twitter_backup.rb', line 14 def self.prepare_file file file = File. file dir = File.dirname file FileUtils.mkdir_p dir unless File.exist? dir FileUtils.touch file unless File.exist? file raise( Error::InvalidPath, "Can't create file: #{file}" ) unless File.exist?( file ) end |