Class: ActiveModel::ErrorCollecting::Reporter

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

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.



5
6
7
# File 'lib/active_model/error_collecting/reporter.rb', line 5

def initialize(collection)
  @collection = collection
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



4
5
6
# File 'lib/active_model/error_collecting/reporter.rb', line 4

def collection
  @collection
end

Instance Method Details

#baseObject



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

def base
  @collection.base
end