Class: Pio::Icmp::Message
Overview
Base class of Icmp::Request and Icmp::Reply.
Class Method Summary
collapse
Instance Method Summary
collapse
inspect
#inspect
Methods inherited from Message
option
Methods included from RubyDumper
#to_ruby
Constructor Details
#initialize(user_options) ⇒ Message
26
27
28
|
# File 'lib/pio/icmp/message.rb', line 26
def initialize(user_options)
@format = Icmp::Format.new(parse_options(user_options))
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
30
31
32
|
# File 'lib/pio/icmp/message.rb', line 30
def method_missing(method, *args)
@format.__send__(method, *args)
end
|
Class Method Details
.create(format) ⇒ Object
20
21
22
23
24
|
# File 'lib/pio/icmp/message.rb', line 20
def self.create(format)
allocate.tap do |message|
message.instance_variable_set :@format, format
end
end
|
.fields ⇒ Object
16
17
18
|
# File 'lib/pio/icmp/message.rb', line 16
def self.fields
Icmp::Format.fields
end
|