Class: Construqt::Addresses::CqIpAddress
- Inherits:
-
Object
- Object
- Construqt::Addresses::CqIpAddress
- Defined in:
- lib/construqt/addresses.rb
Overview
hier frieht die hoelle zu!!!
Instance Attribute Summary collapse
-
#container ⇒ Object
readonly
Returns the value of attribute container.
-
#ipaddr ⇒ Object
readonly
Returns the value of attribute ipaddr.
Instance Method Summary collapse
- #address ⇒ Object
- #compressed ⇒ Object
- #first ⇒ Object
- #groups ⇒ Object
- #include?(a) ⇒ Boolean
-
#initialize(ipaddr, container) ⇒ CqIpAddress
constructor
A new instance of CqIpAddress.
- #ipv4? ⇒ Boolean
- #ipv6? ⇒ Boolean
- #last ⇒ Object
- #netmask ⇒ Object
- #network ⇒ Object
- #prefix ⇒ Object
- #reverse ⇒ Object
- #to_i ⇒ Object
- #to_s ⇒ Object
- #to_string ⇒ Object
- #to_u32 ⇒ Object
Constructor Details
#initialize(ipaddr, container) ⇒ CqIpAddress
Returns a new instance of CqIpAddress.
25 26 27 28 |
# File 'lib/construqt/addresses.rb', line 25 def initialize(ipaddr, container) @ipaddr = ipaddr @container = container end |
Instance Attribute Details
#container ⇒ Object (readonly)
Returns the value of attribute container.
24 25 26 |
# File 'lib/construqt/addresses.rb', line 24 def container @container end |
#ipaddr ⇒ Object (readonly)
Returns the value of attribute ipaddr.
24 25 26 |
# File 'lib/construqt/addresses.rb', line 24 def ipaddr @ipaddr end |
Instance Method Details
#address ⇒ Object
71 72 73 |
# File 'lib/construqt/addresses.rb', line 71 def address @ipaddr.address end |
#compressed ⇒ Object
65 66 67 |
# File 'lib/construqt/addresses.rb', line 65 def compressed @ipaddr.compressed end |
#first ⇒ Object
56 57 58 |
# File 'lib/construqt/addresses.rb', line 56 def first @ipaddr.first end |
#groups ⇒ Object
62 63 64 |
# File 'lib/construqt/addresses.rb', line 62 def groups @ipaddr.groups end |
#include?(a) ⇒ Boolean
35 36 37 |
# File 'lib/construqt/addresses.rb', line 35 def include?(a) @ipaddr.include?(a) end |
#ipv4? ⇒ Boolean
29 30 31 |
# File 'lib/construqt/addresses.rb', line 29 def ipv4? @ipaddr.ipv4? end |
#ipv6? ⇒ Boolean
32 33 34 |
# File 'lib/construqt/addresses.rb', line 32 def ipv6? @ipaddr.ipv6? end |
#last ⇒ Object
59 60 61 |
# File 'lib/construqt/addresses.rb', line 59 def last @ipaddr.last end |
#netmask ⇒ Object
74 75 76 |
# File 'lib/construqt/addresses.rb', line 74 def netmask @ipaddr.netmask end |
#network ⇒ Object
41 42 43 |
# File 'lib/construqt/addresses.rb', line 41 def network @ipaddr.network end |
#prefix ⇒ Object
38 39 40 |
# File 'lib/construqt/addresses.rb', line 38 def prefix @ipaddr.prefix end |
#reverse ⇒ Object
68 69 70 |
# File 'lib/construqt/addresses.rb', line 68 def reverse @ipaddr.reverse end |
#to_i ⇒ Object
44 45 46 |
# File 'lib/construqt/addresses.rb', line 44 def to_i @ipaddr.to_i end |
#to_s ⇒ Object
47 48 49 |
# File 'lib/construqt/addresses.rb', line 47 def to_s @ipaddr.to_s end |
#to_string ⇒ Object
50 51 52 |
# File 'lib/construqt/addresses.rb', line 50 def to_string @ipaddr.to_string end |
#to_u32 ⇒ Object
53 54 55 |
# File 'lib/construqt/addresses.rb', line 53 def to_u32 @ipaddr.to_u32 end |