Exception: Embedson::ClassTypeError
- Inherits:
-
TypeError
- Object
- TypeError
- Embedson::ClassTypeError
- Defined in:
- lib/embedson/exceptions.rb
Instance Attribute Summary collapse
-
#correct_name ⇒ Object
readonly
Returns the value of attribute correct_name.
-
#wrong_name ⇒ Object
readonly
Returns the value of attribute wrong_name.
Instance Method Summary collapse
- #build_message ⇒ Object
-
#initialize(wrong_name, correct_name) ⇒ ClassTypeError
constructor
A new instance of ClassTypeError.
Constructor Details
#initialize(wrong_name, correct_name) ⇒ ClassTypeError
Returns a new instance of ClassTypeError.
5 6 7 8 |
# File 'lib/embedson/exceptions.rb', line 5 def initialize(wrong_name, correct_name) @wrong_name, @correct_name = wrong_name, correct_name super() end |
Instance Attribute Details
#correct_name ⇒ Object (readonly)
Returns the value of attribute correct_name.
3 4 5 |
# File 'lib/embedson/exceptions.rb', line 3 def correct_name @correct_name end |
#wrong_name ⇒ Object (readonly)
Returns the value of attribute wrong_name.
3 4 5 |
# File 'lib/embedson/exceptions.rb', line 3 def wrong_name @wrong_name end |
Instance Method Details
#build_message ⇒ Object
10 11 12 |
# File 'lib/embedson/exceptions.rb', line 10 def "wrong argument type #{wrong_name} (expected #{correct_name})" end |