Class: ActiveModel::ErrorCollecting::HumanHashReporter
- Inherits:
-
HashReporter
- Object
- Reporter
- HashReporter
- ActiveModel::ErrorCollecting::HumanHashReporter
- Defined in:
- lib/active_model/error_collecting/human_hash_reporter.rb
Instance Attribute Summary
Attributes inherited from Reporter
Instance Method Summary collapse
Methods inherited from Reporter
Constructor Details
This class inherits a constructor from ActiveModel::ErrorCollecting::Reporter
Instance Method Details
#to_hash ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/active_model/error_collecting/human_hash_reporter.rb', line 4 def to_hash collection.to_hash.inject({}) do |hash, kv| attribute, = kv hash[attribute] = .map do || HumanMessageFormatter.new(base, ). end hash end end |