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.
215 216 217 |
# File 'lib/sisu/remote.rb', line 215 def initialize(requested_file) @requested_file=requested_file end |
Instance Method Details
#dir_stub ⇒ Object
232 233 234 235 |
# File 'lib/sisu/remote.rb', line 232 def dir_stub re_p_stub=/.+?([^\/]+)$/ re_p_stub.match(path).captures.join if path end |
#name ⇒ Object
239 240 241 |
# File 'lib/sisu/remote.rb', line 239 def name name_source end |
#name_source ⇒ Object
236 237 238 |
# File 'lib/sisu/remote.rb', line 236 def name_source @pod end |
#path ⇒ Object
229 230 231 |
# File 'lib/sisu/remote.rb', line 229 def path @pth end |
#pod ⇒ Object
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/sisu/remote.rb', line 218 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
226 227 228 |
# File 'lib/sisu/remote.rb', line 226 def site @site end |