Module: Cel::Extensions::Network

Defined in:
lib/cel/extensions/network.rb

Defined Under Namespace

Modules: IP

Class Method Summary collapse

Class Method Details

.__check(funcall, checker:) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/cel/extensions/network.rb', line 15

def __check(funcall, checker:)
  funcall.var
  func = funcall.func
  args = funcall.args

  case func
  when :IP, :CIDR
    checker.check_arity(func, args, 0)
    TYPES[:type]
  end
end

.CIDRObject

rubocop:disable Naming/MethodName



31
32
33
# File 'lib/cel/extensions/network.rb', line 31

def CIDR(*) # rubocop:disable Naming/MethodName
  TYPES[:cidr]
end

.implicit?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/cel/extensions/network.rb', line 11

def implicit?
  false
end

.IPObject

rubocop:disable Naming/MethodName



27
28
29
# File 'lib/cel/extensions/network.rb', line 27

def IP(*) # rubocop:disable Naming/MethodName
  TYPES[:ip]
end