Exception: RbYAML::YAMLError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rbyaml/error.rb

Instance Method Summary collapse

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_sObject



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