Class: Jschematic::Attributes::Format::IpAddress
- Inherits:
-
Object
- Object
- Jschematic::Attributes::Format::IpAddress
show all
- Includes:
- Element
- Defined in:
- lib/jschematic/attributes/format.rb
Instance Attribute Summary
Attributes included from Element
#id, #parent
Instance Method Summary
collapse
Methods included from Element
#required?, #title, #to_s
Instance Method Details
#accepts?(addr) ⇒ Boolean
31
32
33
34
35
|
# File 'lib/jschematic/attributes/format.rb', line 31
def accepts?(addr)
IPAddr.new(addr).ipv4?
rescue ArgumentError
false
end
|