Exception: BdecodeError
Instance Attribute Summary collapse
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
Instance Method Summary collapse
-
#initialize(pos = nil) ⇒ BdecodeError
constructor
:nodoc:.
-
#to_s ⇒ Object
:nodoc:.
Constructor Details
#initialize(pos = nil) ⇒ BdecodeError
:nodoc:
139 140 141 |
# File 'lib/bencode.rb', line 139 def initialize(pos = nil) # :nodoc: @pos = pos end |
Instance Attribute Details
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
137 138 139 |
# File 'lib/bencode.rb', line 137 def pos @pos end |
Instance Method Details
#to_s ⇒ Object
:nodoc:
143 144 145 146 147 148 149 |
# File 'lib/bencode.rb', line 143 def to_s # :nodoc: if pos.nil? "syntax error" else "syntax error near position #{pos}" end end |