Module: Exception::Detailed
- Included in:
- Butler::IRC::Parser::ParseError
- Defined in:
- lib/ruby/exception/detailed.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(obj) ⇒ Object
3 4 5 |
# File 'lib/ruby/exception/detailed.rb', line 3 def self.extended(obj) obj.initialize_details end |
Instance Method Details
#append(string) ⇒ Object
16 17 18 |
# File 'lib/ruby/exception/detailed.rb', line 16 def append(string) (@append ||= []).unshift string end |
#initialize_details ⇒ Object
7 8 9 10 |
# File 'lib/ruby/exception/detailed.rb', line 7 def initialize_details @prepend = [] @append = [] end |
#prepend(string) ⇒ Object
12 13 14 |
# File 'lib/ruby/exception/detailed.rb', line 12 def prepend(string) (@prepend ||= []).unshift string end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/ruby/exception/detailed.rb', line 20 def to_s ((@prepend||[])+[super]+(@append||[])).join(' ') end |