Module: ActiveModel::Error::Base
- Included in:
- ActiveModel::Error
- Defined in:
- lib/active_model/error/base.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
4 5 6 |
# File 'lib/active_model/error/base.rb', line 4 def attribute @attribute end |
#base ⇒ Object (readonly)
Returns the value of attribute base.
4 5 6 |
# File 'lib/active_model/error/base.rb', line 4 def base @base end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/active_model/error/base.rb', line 4 def value @value end |
Instance Method Details
#initialize(subject = nil, options = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/active_model/error/base.rb', line 6 def initialize(subject = nil, = {}) @base, @attribute, @value = .values_at(:model, :attribute, :value) @attribute = attribute super(subject, ) end |