Class: Jschematic::Attributes::Format::IpAddress
- Inherits:
-
Object
- Object
- Jschematic::Attributes::Format::IpAddress
- Includes:
- Element
- Defined in:
- lib/jschematic/attributes/format.rb
Instance Attribute Summary
Attributes included from Element
Instance Method Summary collapse
Methods included from Element
#required?, #schema_for, #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 |