Class: DevNull

Inherits:
Object
  • Object
show all
Defined in:
lib/devnull.rb

Constant Summary collapse

VERSION =
"0.1.3"

Instance Method Summary collapse

Constructor Details

#initialize ⇒ DevNull

Returns a new instance of DevNull.



39
40
41
# File 'lib/devnull.rb', line 39

def initialize
  # do nothing
end

Instance Method Details

#<<(obj) ⇒ Object



78
# File 'lib/devnull.rb', line 78

def <<(obj); self; end

#autoclose=(arg) ⇒ Object



107
# File 'lib/devnull.rb', line 107

def autoclose=(arg); arg; end

#autoclose? ⇒ Boolean

Returns:

  • (Boolean)


84
# File 'lib/devnull.rb', line 84

def autoclose?; true; end

#binmode ⇒ Object



79
# File 'lib/devnull.rb', line 79

def binmode; self; end

#binmode? ⇒ Boolean

Returns:

  • (Boolean)


85
# File 'lib/devnull.rb', line 85

def binmode?; true; end

#close ⇒ Object

-- methods that do nothing ++



57
# File 'lib/devnull.rb', line 57

def close; end

#close_on_exec=(arg) ⇒ Object



108
# File 'lib/devnull.rb', line 108

def close_on_exec=(arg); arg; end

#close_on_exec? ⇒ Boolean

Returns:

  • (Boolean)


91
# File 'lib/devnull.rb', line 91

def close_on_exec?; false; end

#close_read ⇒ Object



58
# File 'lib/devnull.rb', line 58

def close_read; end

#close_write ⇒ Object



59
# File 'lib/devnull.rb', line 59

def close_write; end

#closed? ⇒ Boolean

Returns:

  • (Boolean)


86
# File 'lib/devnull.rb', line 86

def closed?; true; end

#closed_read? ⇒ Boolean

Returns:

  • (Boolean)


92
# File 'lib/devnull.rb', line 92

def closed_read?; false; end

#closed_write? ⇒ Boolean

Returns:

  • (Boolean)


93
# File 'lib/devnull.rb', line 93

def closed_write?; false; end

#each(*args) ⇒ Object Also known as: each_line, lines, each_byte, bytes, each_char, chars, each_codepoint, codepoints



117
# File 'lib/devnull.rb', line 117

def each(*args); (block_given? ? self : [].to_enum); end

#eof ⇒ Object



87
# File 'lib/devnull.rb', line 87

def eof; true; end

#eof? ⇒ Boolean

Returns:

  • (Boolean)


88
# File 'lib/devnull.rb', line 88

def eof?; true; end

#external_encoding ⇒ Object



74
# File 'lib/devnull.rb', line 74

def external_encoding; nil; end

#fcntl(arg1, arg2) ⇒ Object

Raises:

  • (NotImplementedError)


51
# File 'lib/devnull.rb', line 51

def fcntl(arg1, arg2); raise NotImplementedError; end

#fdatasync ⇒ Object

Raises:

  • (NotImplementedError)


49
# File 'lib/devnull.rb', line 49

def fdatasync; raise NotImplementedError; end

#fileno ⇒ Object Also known as: to_i

-- methods treated as being not implemented ++

Raises:

  • (NotImplementedError)


46
# File 'lib/devnull.rb', line 46

def fileno; raise NotImplementedError; end

#flush ⇒ Object



80
# File 'lib/devnull.rb', line 80

def flush; self; end

#fsync ⇒ Object

Raises:

  • (NotImplementedError)


48
# File 'lib/devnull.rb', line 48

def fsync; raise NotImplementedError; end

#getbyte ⇒ Object



70
# File 'lib/devnull.rb', line 70

def getbyte; nil; end

#getc ⇒ Object

-- methods that do nothing and returns something ++



69
# File 'lib/devnull.rb', line 69

def getc; nil; end

#gets(arg1 = nil, arg2 = nil) ⇒ Object



71
# File 'lib/devnull.rb', line 71

def gets(arg1=nil, arg2=nil); nil; end

#internal_encoding ⇒ Object



75
# File 'lib/devnull.rb', line 75

def internal_encoding; nil; end

#ioctl(arg1, arg2) ⇒ Object

Raises:

  • (NotImplementedError)


52
# File 'lib/devnull.rb', line 52

def ioctl(arg1, arg2); raise NotImplementedError; end

#isatty ⇒ Object



94
# File 'lib/devnull.rb', line 94

def isatty; false; end

#lineno ⇒ Object



97
# File 'lib/devnull.rb', line 97

def lineno; 0; end

#lineno=(arg) ⇒ Object



109
# File 'lib/devnull.rb', line 109

def lineno=(arg); arg; end

#path ⇒ Object



72
# File 'lib/devnull.rb', line 72

def path; nil; end

#pid ⇒ Object



73
# File 'lib/devnull.rb', line 73

def pid; nil; end

#pos ⇒ Object



98
# File 'lib/devnull.rb', line 98

def pos; 0; end

#pos=(arg) ⇒ Object



110
# File 'lib/devnull.rb', line 110

def pos=(arg); arg; end


60
# File 'lib/devnull.rb', line 60

def print(*args); end

#printf(arg1, *other_args) ⇒ Object



61
# File 'lib/devnull.rb', line 61

def printf(arg1, *other_args); end

#putc(arg) ⇒ Object



106
# File 'lib/devnull.rb', line 106

def putc(arg); arg; end

#puts(*args) ⇒ Object



62
# File 'lib/devnull.rb', line 62

def puts(*args); end

#read(len = 0, outbuf = nil) ⇒ Object



134
135
136
137
138
139
140
141
# File 'lib/devnull.rb', line 134

def read(len = 0, outbuf = nil)
  if outbuf != nil
    outbuf.replace("")
    outbuf
  else
    (len.to_i == 0 ? "" : nil)
  end
end

#read_nonblock(arg1, arg2 = nil) ⇒ Object

Raises:

  • (EOFError)


129
# File 'lib/devnull.rb', line 129

def read_nonblock(arg1, arg2=nil); raise EOFError; end

#readbyte ⇒ Object

Raises:

  • (EOFError)


131
# File 'lib/devnull.rb', line 131

def readbyte; raise EOFError; end

#readchar ⇒ Object

Raises:

  • (EOFError)


130
# File 'lib/devnull.rb', line 130

def readchar; raise EOFError; end

#readline(arg1 = nil, arg2 = nil) ⇒ Object

Raises:

  • (EOFError)


132
# File 'lib/devnull.rb', line 132

def readline(arg1=nil, arg2=nil); raise EOFError; end

#readlines(arg1 = nil, arg2 = nil) ⇒ Object



104
# File 'lib/devnull.rb', line 104

def readlines(arg1=nil, arg2=nil); []; end

#readpartial(arg1, arg2 = nil) ⇒ Object

Raises:

  • (EOFError)


128
# File 'lib/devnull.rb', line 128

def readpartial(arg1, arg2=nil); raise EOFError; end

#reopen(arg1, arg2 = nil) ⇒ Object



81
# File 'lib/devnull.rb', line 81

def reopen(arg1, arg2=nil); self; end

#rewind ⇒ Object



100
# File 'lib/devnull.rb', line 100

def rewind; 0; end

#seek(arg1, arg2 = nil) ⇒ Object



101
# File 'lib/devnull.rb', line 101

def seek(arg1, arg2=nil); 0; end

#set_encoding(arg1, arg2 = nil, arg3 = nil) ⇒ Object



82
# File 'lib/devnull.rb', line 82

def set_encoding(arg1, arg2=nil, arg3=nil); self; end

#stat ⇒ Object

Raises:

  • (NotImplementedError)


50
# File 'lib/devnull.rb', line 50

def stat; raise NotImplementedError; end

#sync ⇒ Object



89
# File 'lib/devnull.rb', line 89

def sync; true; end

#sync=(arg) ⇒ Object



111
# File 'lib/devnull.rb', line 111

def sync=(arg); arg; end

#sysread(arg1, arg2 = nil) ⇒ Object

Raises:

  • (EOFError)


127
# File 'lib/devnull.rb', line 127

def sysread(arg1, arg2=nil); raise EOFError; end

#sysseek(arg1, arg2 = nil) ⇒ Object



102
# File 'lib/devnull.rb', line 102

def sysseek(arg1, arg2=nil); 0; end

#syswrite(arg) ⇒ Object



114
# File 'lib/devnull.rb', line 114

def syswrite(arg); arg.to_s.length; end

#tell ⇒ Object



99
# File 'lib/devnull.rb', line 99

def tell; 0; end

#to_io ⇒ Object



77
# File 'lib/devnull.rb', line 77

def to_io; self; end

#truncate(arg) ⇒ Object



112
# File 'lib/devnull.rb', line 112

def truncate(arg); arg; end

#tty? ⇒ Boolean

Returns:

  • (Boolean)


95
# File 'lib/devnull.rb', line 95

def tty?; false; end

#ungetbyte(arg) ⇒ Object



63
# File 'lib/devnull.rb', line 63

def ungetbyte(arg); end

#ungetc(arg) ⇒ Object



64
# File 'lib/devnull.rb', line 64

def ungetc(arg); end

#write(arg) ⇒ Object



113
# File 'lib/devnull.rb', line 113

def write(arg); arg.to_s.length; end

#write_nonblock(arg) ⇒ Object



115
# File 'lib/devnull.rb', line 115

def write_nonblock(arg); arg.to_s.length; end