Class: Pio::Arp::Message

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

Overview

Base class of ARP Request and 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/arp/message.rb', line 9

def initialize(user_options)
  options = self.class.const_get(:Options).new(user_options.dup.freeze)
  @format = Arp::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/arp/message.rb', line 14

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