Module: Protip::Converter
- Extended by:
- ActiveSupport::Concern
- Included in:
- StandardConverter
- Defined in:
- lib/protip/converter.rb
Instance Method Summary collapse
- #convertible?(message_class) ⇒ Boolean
- #to_message(object, message_class) ⇒ Object
- #to_object(message) ⇒ Object
Instance Method Details
#convertible?(message_class) ⇒ Boolean
8 9 10 11 12 |
# File 'lib/protip/converter.rb', line 8 def convertible?() raise NotImplementedError.new( 'Must specify whether a message of a given type can be converted to/from a Ruby object' ) end |
#to_message(object, message_class) ⇒ Object
18 19 20 |
# File 'lib/protip/converter.rb', line 18 def (object, ) raise NotImplementedError.new('Must convert a Ruby object into a message of the given type') end |
#to_object(message) ⇒ Object
14 15 16 |
# File 'lib/protip/converter.rb', line 14 def to_object() raise NotImplementedError.new('Must convert a message into a Ruby object') end |