Class: Porch::HumanError
- Inherits:
-
Object
- Object
- Porch::HumanError
- Defined in:
- lib/porch/human_error.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#seperator ⇒ Object
Returns the value of attribute seperator.
Instance Method Summary collapse
-
#initialize(errors, seperator = ", ") ⇒ HumanError
constructor
A new instance of HumanError.
- #message ⇒ Object
Constructor Details
#initialize(errors, seperator = ", ") ⇒ HumanError
Returns a new instance of HumanError.
6 7 8 9 |
# File 'lib/porch/human_error.rb', line 6 def initialize(errors, seperator=", ") @errors = errors @seperator = seperator end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/porch/human_error.rb', line 4 def errors @errors end |
#seperator ⇒ Object
Returns the value of attribute seperator.
3 4 5 |
# File 'lib/porch/human_error.rb', line 3 def seperator @seperator end |
Instance Method Details
#message ⇒ Object
11 12 13 |
# File 'lib/porch/human_error.rb', line 11 def (errors).join(seperator) end |