Class: OverSIP::SIP::RFC3263::Target

Inherits:
Struct
  • Object
show all
Defined in:
lib/oversip/sip/rfc3263.rb,
lib/oversip/sip/rfc3263.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ipObject

Returns the value of attribute ip

Returns:

  • (Object)

    the current value of ip



5
6
7
# File 'lib/oversip/sip/rfc3263.rb', line 5

def ip
  @ip
end

#ip_typeObject

Returns the value of attribute ip_type

Returns:

  • (Object)

    the current value of ip_type



5
6
7
# File 'lib/oversip/sip/rfc3263.rb', line 5

def ip_type
  @ip_type
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



5
6
7
# File 'lib/oversip/sip/rfc3263.rb', line 5

def port
  @port
end

#transportObject

Returns the value of attribute transport

Returns:

  • (Object)

    the current value of transport



5
6
7
# File 'lib/oversip/sip/rfc3263.rb', line 5

def transport
  @transport
end

Instance Method Details

#to_sObject



8
9
10
11
12
13
14
# File 'lib/oversip/sip/rfc3263.rb', line 8

def to_s
  if self[2] == :ipv4
    "#{self[0]}:#{self[1]}:#{self[3]}"
  else
    "#{self[0]}:[#{self[1]}]:#{self[3]}"
  end
end