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



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

def ports
  @ports
end

#sourcesObject

Returns the value of attribute sources

Returns:

  • (Object)

    the current value of sources



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

def sources
  @sources
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



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

def type
  @type
end

Instance Method Details

#icmp?Boolean

Returns:

  • (Boolean)


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

def icmp?
  type == :icmp
end

#tcp?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/holepunch/definition.rb', line 59

def tcp?
  type == :tcp
end

#udp?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/holepunch/definition.rb', line 63

def udp?
  type == :udp
end