Class: Coppertone::Mechanism::IP4

Inherits:
IPMechanism show all
Defined in:
lib/coppertone/mechanism/ip4.rb

Overview

Implements the ip4 mechanism.

Constant Summary

Constants inherited from IPMechanism

Coppertone::Mechanism::IPMechanism::IP_PARSE_ERROR, Coppertone::Mechanism::IPMechanism::LEADING_ZEROES_IN_CIDR_REGEXP

Instance Attribute Summary

Attributes inherited from IPMechanism

#cidr_length, #netblock

Attributes inherited from Coppertone::Mechanism

#arguments

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from IPMechanism

#==, create, #default_cidr, #initialize, #match?, #parse_netblock, #validate_no_leading_zeroes_in_cidr

Methods inherited from Coppertone::Mechanism

build, class_builder, #context_dependent?, dns_lookup_term?, #dns_lookup_term?, #includes_ptr?, #initialize, register, #to_s

Constructor Details

This class inherits a constructor from Coppertone::Mechanism::IPMechanism

Class Method Details

.labelObject



11
12
13
# File 'lib/coppertone/mechanism/ip4.rb', line 11

def self.label
  'ip4'
end

Instance Method Details

#ip_for_match(macro_context) ⇒ Object



7
8
9
# File 'lib/coppertone/mechanism/ip4.rb', line 7

def ip_for_match(macro_context)
  macro_context.ip_v4
end