Class: HolePunch::Permission

Inherits:
Struct
  • Object
show all
Defined in:
lib/holepunch/definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#portsObject

Returns the value of attribute ports

Returns:

  • (Object)

    the current value of ports



45
46
47
# File 'lib/holepunch/definition.rb', line 45

def ports
  @ports
end

#sourcesObject

Returns the value of attribute sources

Returns:

  • (Object)

    the current value of sources



45
46
47
# File 'lib/holepunch/definition.rb', line 45

def sources
  @sources
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



45
46
47
# File 'lib/holepunch/definition.rb', line 45

def type
  @type
end

Instance Method Details

#icmp?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/holepunch/definition.rb', line 46

def icmp?
  type == :icmp
end

#tcp?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/holepunch/definition.rb', line 50

def tcp?
  type == :tcp
end

#udp?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/holepunch/definition.rb', line 54

def udp?
  type == :udp
end