Class: ActiveModel::BetterErrors::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/active_model/better_errors/reporter.rb

Overview

Reporter

Direct Known Subclasses

ArrayReporter, HashReporter, MessageReporter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(collection) ⇒ Reporter

Returns a new instance of Reporter.



10
11
12
# File 'lib/active_model/better_errors/reporter.rb', line 10

def initialize(collection)
  @collection = collection
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



9
10
11
# File 'lib/active_model/better_errors/reporter.rb', line 9

def collection
  @collection
end

Instance Method Details

#baseObject



14
15
16
# File 'lib/active_model/better_errors/reporter.rb', line 14

def base
  @collection.base
end