Exception: RbYAML::YAMLError
- Defined in:
- lib/rbyaml/error.rb
Direct Known Subclasses
ComposerError, EmitterError, ParserError, RepresenterError, ResolverError, SerializerError, TypeError
Instance Method Summary collapse
-
#initialize(context = nil, problem = nil, note = nil) ⇒ YAMLError
constructor
A new instance of YAMLError.
- #to_s ⇒ Object
Constructor Details
#initialize(context = nil, problem = nil, note = nil) ⇒ YAMLError
Returns a new instance of YAMLError.
4 5 6 7 8 9 |
# File 'lib/rbyaml/error.rb', line 4 def initialize(context=nil, problem=nil, note=nil) super() @context = context @problem = problem @note = note end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/rbyaml/error.rb', line 11 def to_s lines = [] lines << @context if @context lines << @problem if @problem lines << @note if @note lines.join("\n") end |