Class: SiSU_Remote::RemoteDownload
- Inherits:
-
Object
- Object
- SiSU_Remote::RemoteDownload
- Defined in:
- lib/sisu/remote.rb
Instance Method Summary collapse
- #dir_stub ⇒ Object
-
#initialize(requested_file) ⇒ RemoteDownload
constructor
A new instance of RemoteDownload.
- #name ⇒ Object
- #name_source ⇒ Object
- #path ⇒ Object
- #pod ⇒ Object
- #site ⇒ Object
Constructor Details
#initialize(requested_file) ⇒ RemoteDownload
Returns a new instance of RemoteDownload.
213 214 215 |
# File 'lib/sisu/remote.rb', line 213 def initialize(requested_file) @requested_file=requested_file end |
Instance Method Details
#dir_stub ⇒ Object
230 231 232 233 |
# File 'lib/sisu/remote.rb', line 230 def dir_stub re_p_stub=/.+?([^\/]+)$/ re_p_stub.match(path).captures.join if path end |
#name ⇒ Object
237 238 239 |
# File 'lib/sisu/remote.rb', line 237 def name name_source end |
#name_source ⇒ Object
234 235 236 |
# File 'lib/sisu/remote.rb', line 234 def name_source @pod end |
#path ⇒ Object
227 228 229 |
# File 'lib/sisu/remote.rb', line 227 def path @pth end |
#pod ⇒ Object
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/sisu/remote.rb', line 216 def pod re_p_div=/https?:\/\/([^\/]+)(\/\S+)\/(sisupod\.(?:txz|zip)|\S+?(?:\.ss[mt]\.(?:txz|zip))?|[^\/]+?\.ssp)$/ re_p=/(sisupod\.(?:txz|zip)|\S+?\.ss[mt]\.(?:txz|zip)?|[^\/]+?\.ssp)$/ if @requested_file =~ re_p_div @site,@pth,@pod= re_p_div.match(@requested_file).captures elsif @requested_file =~ re_p @pod=re_p.match(@requested_file).captures.join end def site @site end def path @pth end def dir_stub re_p_stub=/.+?([^\/]+)$/ re_p_stub.match(path).captures.join if path end def name_source @pod end def name name_source end self end |
#site ⇒ Object
224 225 226 |
# File 'lib/sisu/remote.rb', line 224 def site @site end |