Class: RIO::Temp::Dir::RL

Inherits:
RL::PathBase show all
Defined in:
lib/rio/scheme/temp.rb

Constant Summary collapse

RIOSCHEME =
'tempdir'
DFLT_PREFIX =
Temp::RL::DFLT_PREFIX
DFLT_TMPDIR =
Temp::RL::DFLT_TMPDIR
SPLIT_RE =

self

Temp::RL::SPLIT_RE

Constants inherited from RL::PathBase

RL::PathBase::RESET_STATE

Constants inherited from RL::URIBase

RL::URIBase::HOST, RL::URIBase::SCHEME

Constants inherited from RL::WithPath

RL::WithPath::HOST, RL::WithPath::SCHEME

Instance Attribute Summary collapse

Attributes inherited from RL::URIBase

#uri

Attributes inherited from RL::Base

#fs

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RL::PathBase

#arg0_info_, #build_arg0_, #fspath, #join, #scheme, #to_s, #url, #use_host?

Methods inherited from RL::URIBase

#_get_base_from_arg, #_get_opts_from_args, #absolute?, #arg0_info_, #base, #base=, #host, #host=, #init_from_args_, #initialize_copy, #join, #opaque, #openfs_, #path, #path=, #pathroot, #scheme, #to_s, #url, #urlpath, #urlpath=, #urlroot

Methods inherited from RL::WithPath

#_build, #_parts, #_uri, #abs, #base, #basename, #build_arg0_, #dirname, #filename, #fspath, #fspath=, #fspath_no_slash, #host, #host=, #is_root?, #join, #merge, #opaque, #openfs_, #path, #path=, #path_no_slash, #pathdepth, #pathroot, #route_from, #route_to, #scheme, #split, #uri, #uri_from_string_, #urlpath, #urlpath=

Methods included from Error::NotImplemented

#nodef

Methods inherited from RL::Base

#==, #===, #=~, #callstr, #close, #escape, #fs2url, #fspath, #initialize_copy, is_riorl?, #length, #openfs_, parse, #path, #rl, split_riorl, subscheme, #to_rl, #to_s, #unescape, #url, #url2fs

Constructor Details

#initialize(file_prefix = DFLT_PREFIX, temp_dir = DFLT_TMPDIR) ⇒ RL

Returns a new instance of RL.



85
86
87
88
89
90
91
92
# File 'lib/rio/scheme/temp.rb', line 85

def initialize(file_prefix=DFLT_PREFIX,temp_dir=DFLT_TMPDIR)
  #puts "initialize(#{file_prefix.inspect},#{temp_dir.inspect})"
  @prefix = file_prefix || DFLT_PREFIX
  @tmpdir = temp_dir || DFLT_TMPDIR
  require 'rio/tempdir'
  @td = ::Tempdir.new( @prefix.to_s, @tmpdir.to_s)
  super(@td.to_s)
end

Instance Attribute Details

#prefixObject (readonly)

Returns the value of attribute prefix.



84
85
86
# File 'lib/rio/scheme/temp.rb', line 84

def prefix
  @prefix
end

#tmpdirObject (readonly)

Returns the value of attribute tmpdir.



84
85
86
# File 'lib/rio/scheme/temp.rb', line 84

def tmpdir
  @tmpdir
end

#tmprlObject (readonly)

Returns the value of attribute tmprl.



84
85
86
# File 'lib/rio/scheme/temp.rb', line 84

def tmprl
  @tmprl
end

Class Method Details

.splitrl(s) ⇒ Object



99
100
101
# File 'lib/rio/scheme/temp.rb', line 99

def self.splitrl(s)
  Temp::RL.splitrl(s)
end

Instance Method Details

#dir_rlObject



93
94
95
96
97
# File 'lib/rio/scheme/temp.rb', line 93

def dir_rl() 
  #p "temp:dir_rl: #{self.uri.inspect}"
  RIO::Dir::RL.new(self.uri, {:fs => self.fs})
  #self 
end