Class: Dtn::Message

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/dtn/message.rb

Overview

Message abstraction

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.callback_nameObject



11
12
13
# File 'lib/dtn/message.rb', line 11

def callback_name
  @callback_name ||= name.demodulize.underscore
end

.parse(**options) ⇒ Object



7
8
9
# File 'lib/dtn/message.rb', line 7

def parse(**options)
  new(options)
end

Instance Method Details

#callback_nameObject



16
17
18
# File 'lib/dtn/message.rb', line 16

def callback_name
  self.class.callback_name
end