Class: NetworkPolicy::NetworkPolicyPeer::IPBlock
- Inherits:
-
NetworkPolicy::NetworkPolicyPeer
- Object
- NetworkPolicy::NetworkPolicyPeer
- NetworkPolicy::NetworkPolicyPeer::IPBlock
- Defined in:
- lib/xlsx_to_k8s_network_policy.rb
Overview
An cidr NetworkPolicyPeer
Instance Attribute Summary collapse
-
#cidr ⇒ Object
readonly
Returns the value of attribute cidr.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #as_hash ⇒ Object
-
#initialize(cidr = nil) ⇒ IPBlock
constructor
A new instance of IPBlock.
Constructor Details
#initialize(cidr = nil) ⇒ IPBlock
Returns a new instance of IPBlock.
80 81 82 |
# File 'lib/xlsx_to_k8s_network_policy.rb', line 80 def initialize(cidr = nil) @cidr = cidr || [] end |
Instance Attribute Details
#cidr ⇒ Object (readonly)
Returns the value of attribute cidr.
79 80 81 |
# File 'lib/xlsx_to_k8s_network_policy.rb', line 79 def cidr @cidr end |
Instance Method Details
#==(other) ⇒ Object
90 91 92 |
# File 'lib/xlsx_to_k8s_network_policy.rb', line 90 def ==(other) other.class == self.class && other.cidr == cidr end |
#as_hash ⇒ Object
84 85 86 87 88 |
# File 'lib/xlsx_to_k8s_network_policy.rb', line 84 def as_hash { ipBlock: cidr } end |