Class: RIO::IOS::Null
Overview
Instance Method Summary
collapse
-
#<<(obj) ⇒ Object
-
#binmode ⇒ Object
-
#callstr(func, *args) ⇒ Object
-
#close ⇒ Object
-
#close_read ⇒ Object
-
#close_write ⇒ Object
-
#closed? ⇒ Boolean
-
#each(sep_string = $/, &block) ⇒ Object
-
#each_byte(sep_string = $/, &block) ⇒ Object
-
#each_line(sep_string = $/, &block) ⇒ Object
-
#eof? ⇒ Boolean
-
#flush ⇒ Object
def fcntl(integer_cmd,arg) notsupported(:fcntl) end def fileno() notsupported(:fileno) end def to_i() notsupported(:to_i) end.
-
#fsync ⇒ Object
-
#getc ⇒ Object
-
#gets(sep_string = $/) ⇒ Object
-
#initialize(el = nil, m = 'r') ⇒ Null
constructor
-
#isatty ⇒ Object
-
#lineno ⇒ Object
-
#lineno=(a) ⇒ Object
-
#pos ⇒ Object
def pid() notsupported(:pid) end.
-
#pos=(v) ⇒ Object
-
#print(*objs) ⇒ Object
-
#printf(format, *objs) ⇒ Object
-
#putc(obj) ⇒ Object
-
#puts(*objs) ⇒ Object
-
#read(length = nil, *args) ⇒ Object
-
#readchar ⇒ Object
-
#readline(sep_string = $/) ⇒ Object
-
#readlines(sep_string = $/) ⇒ Object
-
#readpartial(maxlen, *args) ⇒ Object
-
#reopen(*args) ⇒ Object
-
#rewind ⇒ Object
-
#seek(amount, whence) ⇒ Object
-
#tell ⇒ Object
-
#tty? ⇒ Boolean
def ioctl(integer_cmd,arg) notsupported(:ioctl) end.
-
#write(str) ⇒ Object
def stat() notsupported(:stat) end def sync() notsupported(:sync) end def sync=(v) notsupported(:sync=) end def sysread() notsupported(:sysread) end def sysseek() notsupported(:sysseek) end def syswrite() notsupported(:syswrite) end def ungetc() notsupported(:ungetc) end.
Methods included from Fail
#fcntl, #fileno, #ioctl, #notsupported, #pid, #stat, #sync, #sync=, #sysread, #sysseek, #syswrite, #to_i, #ungetc
Constructor Details
#initialize(el = nil, m = 'r') ⇒ Null
Returns a new instance of Null.
57
58
59
60
61
62
|
# File 'lib/rio/ios/null.rb', line 57
def initialize(el=nil,m='r')
@lineno = 0
@open = true
@mode = Mode.new(m)
@pos = 0
end
|
Instance Method Details
66
|
# File 'lib/rio/ios/null.rb', line 66
def <<(obj) self end
|
67
|
# File 'lib/rio/ios/null.rb', line 67
def binmode() self end
|
#callstr(func, *args) ⇒ Object
113
114
115
|
# File 'lib/rio/ios/null.rb', line 113
def callstr(func,*args)
self.class.to_s+'['+self.to_s+']'+'.'+func.to_s+'('+args.join(',')+')'
end
|
68
|
# File 'lib/rio/ios/null.rb', line 68
def close() @open = false end
|
#closed? ⇒ Boolean
71
|
# File 'lib/rio/ios/null.rb', line 71
def closed?() not @open end
|
#each(sep_string = $/, &block) ⇒ Object
72
|
# File 'lib/rio/ios/null.rb', line 72
def each(sep_string=$/,&block) self end
|
#each_byte(sep_string = $/, &block) ⇒ Object
74
|
# File 'lib/rio/ios/null.rb', line 74
def each_byte(sep_string=$/,&block) self end
|
#each_line(sep_string = $/, &block) ⇒ Object
73
|
# File 'lib/rio/ios/null.rb', line 73
def each_line(sep_string=$/,&block) self end
|
#eof? ⇒ Boolean
75
|
# File 'lib/rio/ios/null.rb', line 75
def eof?() true end
|
def fcntl(integer_cmd,arg) notsupported(:fcntl) end def fileno() notsupported(:fileno) end def to_i() notsupported(:to_i) end
79
|
# File 'lib/rio/ios/null.rb', line 79
def flush() nil end
|
80
|
# File 'lib/rio/ios/null.rb', line 80
def fsync() nil end
|
81
|
# File 'lib/rio/ios/null.rb', line 81
def getc() nil end
|
#gets(sep_string = $/) ⇒ Object
82
|
# File 'lib/rio/ios/null.rb', line 82
def gets(sep_string=$/) nil end
|
85
|
# File 'lib/rio/ios/null.rb', line 85
def isatty() tty? end
|
86
|
# File 'lib/rio/ios/null.rb', line 86
def lineno() @lineno end
|
#lineno=(a) ⇒ Object
87
|
# File 'lib/rio/ios/null.rb', line 87
def lineno=(a) @lineno = a; lineno() end
|
def pid() notsupported(:pid) end
89
|
# File 'lib/rio/ios/null.rb', line 89
def pos() 0 end
|
91
|
# File 'lib/rio/ios/null.rb', line 91
def pos=(v) @pos = v; pos end
|
#print(*objs) ⇒ Object
92
|
# File 'lib/rio/ios/null.rb', line 92
def print(*objs) nil end
|
#printf(format, *objs) ⇒ Object
93
|
# File 'lib/rio/ios/null.rb', line 93
def printf(format,*objs) nil end
|
#putc(obj) ⇒ Object
94
|
# File 'lib/rio/ios/null.rb', line 94
def putc(obj) nil end
|
#puts(*objs) ⇒ Object
95
|
# File 'lib/rio/ios/null.rb', line 95
def puts(*objs) nil end
|
#read(length = nil, *args) ⇒ Object
96
|
# File 'lib/rio/ios/null.rb', line 96
def read(length=nil,*args) length.nil? ? "" : nil end
|
97
|
# File 'lib/rio/ios/null.rb', line 97
def readchar() raise EOFError end
|
#readline(sep_string = $/) ⇒ Object
98
|
# File 'lib/rio/ios/null.rb', line 98
def readline(sep_string=$/) raise EOFError end
|
#readlines(sep_string = $/) ⇒ Object
99
|
# File 'lib/rio/ios/null.rb', line 99
def readlines(sep_string=$/) [] end
|
#readpartial(maxlen, *args) ⇒ Object
100
|
# File 'lib/rio/ios/null.rb', line 100
def readpartial(maxlen,*args) raise EOFError end
|
#reopen(*args) ⇒ Object
101
|
# File 'lib/rio/ios/null.rb', line 101
def reopen(*args) self end
|
102
|
# File 'lib/rio/ios/null.rb', line 102
def rewind() 0 end
|
#seek(amount, whence) ⇒ Object
103
|
# File 'lib/rio/ios/null.rb', line 103
def seek(amount,whence) 0 end
|
90
|
# File 'lib/rio/ios/null.rb', line 90
def tell() pos() end
|
#tty? ⇒ Boolean
def ioctl(integer_cmd,arg) notsupported(:ioctl) end
84
|
# File 'lib/rio/ios/null.rb', line 84
def tty?() false end
|
#write(str) ⇒ Object
def stat() notsupported(:stat) end def sync() notsupported(:sync) end def sync=(v) notsupported(:sync=) end def sysread() notsupported(:sysread) end def sysseek() notsupported(:sysseek) end def syswrite() notsupported(:syswrite) end def ungetc() notsupported(:ungetc) end
111
|
# File 'lib/rio/ios/null.rb', line 111
def write(str) str.length end
|