Class: RIO::FD::RL

Inherits:
RL::SysIOBase
  • Object
show all
Defined in:
lib/rio/scheme/fd.rb

Constant Summary collapse

RIOSCHEME =
'fd'
RIOPATH =
RIO::RL::CHMAP.invert[RIOSCHEME].freeze
SPLIT_RE =

must be able to process parse(‘rio:fd:<number>’)

%r|(\d+)$|

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fd) ⇒ RL

Returns a new instance of RL.



45
46
47
48
# File 'lib/rio/scheme/fd.rb', line 45

def initialize(fd)
  @fd = fd
  super
end

Class Method Details

.splitrl(s) ⇒ Object



56
57
58
59
60
61
62
# File 'lib/rio/scheme/fd.rb', line 56

def self.splitrl(s)
  sub,opq,whole = split_riorl(s)
  if bm = SPLIT_RE.match(opq)
    fd = bm[1].to_i
    [fd]
  end
end

Instance Method Details

#opaqueObject



52
# File 'lib/rio/scheme/fd.rb', line 52

def opaque() "#{@fd}" end

#open(m, *args) ⇒ Object



49
50
51
# File 'lib/rio/scheme/fd.rb', line 49

def open(m,*args)
  super(::IO.new(@fd,m.to_s))
end