Class: IO

Inherits:
Object show all
Defined in:
lib/bencode/io.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.bdecode(filename) ⇒ Object



3
4
5
# File 'lib/bencode/io.rb', line 3

def self.bdecode(filename)
  open(filename, 'r').bdecode
end

.bencode(filename) ⇒ Object



7
8
9
# File 'lib/bencode/io.rb', line 7

def self.bencode(filename)
  open(filename, 'r').bencode
end

Instance Method Details

#bdecodeObject



11
12
13
# File 'lib/bencode/io.rb', line 11

def bdecode
  read.chomp.bdecode
end

#bencodeObject



15
16
17
# File 'lib/bencode/io.rb', line 15

def bencode
  read.chomp.bencode
end