Exception: Protobuf::ActiveRecord::MessageNotDefined
- Inherits:
-
ProtobufActiveRecordError
- Object
- StandardError
- ProtobufActiveRecordError
- Protobuf::ActiveRecord::MessageNotDefined
- Defined in:
- lib/protobuf/active_record/errors.rb
Overview
Raised by ‘to_proto` when no protobuf message is defined.
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
Instance Method Summary collapse
-
#initialize(klass) ⇒ MessageNotDefined
constructor
A new instance of MessageNotDefined.
- #message ⇒ Object
Constructor Details
#initialize(klass) ⇒ MessageNotDefined
Returns a new instance of MessageNotDefined.
29 30 31 |
# File 'lib/protobuf/active_record/errors.rb', line 29 def initialize(klass) @class_name = klass.name end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
27 28 29 |
# File 'lib/protobuf/active_record/errors.rb', line 27 def class_name @class_name end |
Instance Method Details
#message ⇒ Object
33 34 35 |
# File 'lib/protobuf/active_record/errors.rb', line 33 def "#{class_name} does not define a protobuf message" end |