Module: Bencoding
- Defined in:
- lib/bencoding.rb,
lib/bencoding/hash.rb,
lib/bencoding/array.rb,
lib/bencoding/object.rb,
lib/bencoding/parser.rb,
lib/bencoding/string.rb,
lib/bencoding/symbol.rb,
lib/bencoding/numeric.rb,
lib/bencoding/version.rb
Defined Under Namespace
Modules: Array, Hash, Numeric, Object, Parser, String, Symbol, VERSION
Classes: InvalidInput, ParseError
Class Method Summary
collapse
Class Method Details
.dump(object) ⇒ Object
14
15
16
|
# File 'lib/bencoding.rb', line 14
def self.dump(object)
object.to_bencoding
end
|
11
12
13
|
# File 'lib/bencoding.rb', line 11
def self.load(io)
return load!(io) rescue nil
end
|
.load!(io) ⇒ Object
8
9
10
|
# File 'lib/bencoding.rb', line 8
def self.load!(io)
Parser.load(io)
end
|