Exception: Sprinkle::Errors::PrettyFailure
- Defined in:
- lib/sprinkle/errors/pretty_failure.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
Instance Method Summary collapse
- #boxed(s) ⇒ Object
-
#initialize(installer, details = {}, previous_error = nil) ⇒ PrettyFailure
constructor
A new instance of PrettyFailure.
- #log(s, o) ⇒ Object
Constructor Details
#initialize(installer, details = {}, previous_error = nil) ⇒ PrettyFailure
Returns a new instance of PrettyFailure.
8 9 10 11 12 |
# File 'lib/sprinkle/errors/pretty_failure.rb', line 8 def initialize(installer, details={}, previous_error=nil) @installer = installer @details = details @previous_error = previous_error end |
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details.
6 7 8 |
# File 'lib/sprinkle/errors/pretty_failure.rb', line 6 def details @details end |
Instance Method Details
#boxed(s) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/sprinkle/errors/pretty_failure.rb', line 21 def boxed(s) puts red("-"*54) puts red("| #{s.center(50)} |") puts red("-"*54) puts end |
#log(s, o) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/sprinkle/errors/pretty_failure.rb', line 14 def log(s, o) puts s puts "-" * (s.length+2) puts o puts end |