Class: Thwomp::Downloader
- Inherits:
-
Struct
- Object
- Struct
- Thwomp::Downloader
- Defined in:
- lib/thwomp/downloader.rb
Overview
Downloads SWF files
Instance Attribute Summary collapse
-
#swf_url ⇒ Object
Returns the value of attribute swf_url.
Instance Method Summary collapse
-
#filename ⇒ Object
returns filename of local/remote file.
-
#local? ⇒ Boolean
tests if the given file is local.
-
#remote? ⇒ Boolean
tests if the given file remote.
Instance Attribute Details
#swf_url ⇒ Object
Returns the value of attribute swf_url
3 4 5 |
# File 'lib/thwomp/downloader.rb', line 3 def swf_url @swf_url end |
Instance Method Details
#filename ⇒ Object
returns filename of local/remote file
16 17 18 |
# File 'lib/thwomp/downloader.rb', line 16 def filename local?? swf_url : tmp_file.path end |
#local? ⇒ Boolean
tests if the given file is local
11 12 13 |
# File 'lib/thwomp/downloader.rb', line 11 def local? !remote? end |
#remote? ⇒ Boolean
tests if the given file remote
6 7 8 |
# File 'lib/thwomp/downloader.rb', line 6 def remote? swf_url =~ /^http(s)?::/ end |