Class: Pio::Icmp::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/pio/icmp/message.rb

Overview

Base class of Icmp::Request and Icmp::Reply.

Direct Known Subclasses

Reply, Request

Instance Method Summary collapse

Constructor Details

#initialize(user_options) ⇒ Message

Returns a new instance of Message.



9
10
11
12
# File 'lib/pio/icmp/message.rb', line 9

def initialize(user_options)
  options = self.class.const_get(:Options).new(user_options)
  @format = Icmp::Format.new(options.to_hash)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



14
15
16
# File 'lib/pio/icmp/message.rb', line 14

def method_missing(method, *args)
  @format.__send__(method, *args)
end