Class: Momomoto::Datatype::Inet

Inherits:
Text
  • Object
show all
Defined in:
lib/momomoto/datatype/inet.rb

Overview

This class represents data type Inet which is an IPv4 or IPv6 host or address.

Instance Method Summary collapse

Methods inherited from Text

#equal, #escape, operator_sign

Methods inherited from Base

#compile_rule, #default, #default_operator, #equal, #escape, #initialize, #not_null?, operator_sign

Constructor Details

This class inherits a constructor from Momomoto::Datatype::Base

Instance Method Details

#filter_set(value) ⇒ Object

Values are filtered by this method when being set. Returns nil if value is empty or nil.



9
10
11
12
13
14
# File 'lib/momomoto/datatype/inet.rb', line 9

def filter_set( value )
  case value
    when nil, '' then nil
    else value
  end
end