Exception: AttributedClass::AttributeError
- Defined in:
- lib/attributed_class.rb
Instance Method Summary collapse
-
#initialize(anObject, anAttr, val = nil) ⇒ AttributeError
constructor
A new instance of AttributeError.
Constructor Details
#initialize(anObject, anAttr, val = nil) ⇒ AttributeError
Returns a new instance of AttributeError.
164 165 166 167 168 169 170 171 |
# File 'lib/attributed_class.rb', line 164 def initialize ( anObject, anAttr, val=nil ) if val.nil? super "Missing the `#{anAttr.name}' attribute for `#{anObject}'" else super "Attribute `#{anAttr.name}' wait for a " + "`#{anAttr.klass.join(' or ')}' not `#{val}' in #{anObject}" end end |