Class: ActiveModel::BetterErrors::Formatter
- Inherits:
-
Object
- Object
- ActiveModel::BetterErrors::Formatter
- Extended by:
- Forwardable
- Defined in:
- lib/active_model/better_errors/formatter.rb
Overview
Abstract Formatter class
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
Instance Method Summary collapse
-
#format_message ⇒ Object
abstract
Formats the error message into a comsumable string.
-
#initialize(base, error_message) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(base, error_message) ⇒ Formatter
Returns a new instance of Formatter.
14 15 16 |
# File 'lib/active_model/better_errors/formatter.rb', line 14 def initialize(base, ) @base, @error_message = base, end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
12 13 14 |
# File 'lib/active_model/better_errors/formatter.rb', line 12 def base @base end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
12 13 14 |
# File 'lib/active_model/better_errors/formatter.rb', line 12 def @error_message end |
Instance Method Details
#format_message ⇒ Object
This method is abstract.
Formats the error message into a comsumable string. see HumanMessageFormatter for more details.
22 23 |
# File 'lib/active_model/better_errors/formatter.rb', line 22 def end |