Class: NgrokAPI::Models::Tunnel

Inherits:
Object
  • Object
show all
Defined in:
lib/ngrokapi/models/tunnel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client: nil, attrs: {}) ⇒ Tunnel

Returns a new instance of Tunnel.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/ngrokapi/models/tunnel.rb', line 20

def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @id = @attrs['id']
  @public_url = @attrs['public_url']
  @started_at = @attrs['started_at']
  @metadata = @attrs['metadata']
  @proto = @attrs['proto']
  @region = @attrs['region']
  @tunnel_session = @attrs['tunnel_session']
  @endpoint = @attrs['endpoint']
  @labels = @attrs['labels']
  @backends = @attrs['backends']
  @forwards_to = @attrs['forwards_to']
end

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def attrs
  @attrs
end

#backendsObject (readonly)

Returns the value of attribute backends.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def backends
  @backends
end

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def client
  @client
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def endpoint
  @endpoint
end

#forwards_toObject (readonly)

Returns the value of attribute forwards_to.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def forwards_to
  @forwards_to
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def id
  @id
end

#labelsObject (readonly)

Returns the value of attribute labels.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def labels
  @labels
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def 
  @metadata
end

#protoObject (readonly)

Returns the value of attribute proto.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def proto
  @proto
end

#public_urlObject (readonly)

Returns the value of attribute public_url.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def public_url
  @public_url
end

#regionObject (readonly)

Returns the value of attribute region.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def region
  @region
end

#started_atObject (readonly)

Returns the value of attribute started_at.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def started_at
  @started_at
end

#tunnel_sessionObject (readonly)

Returns the value of attribute tunnel_session.



6
7
8
# File 'lib/ngrokapi/models/tunnel.rb', line 6

def tunnel_session
  @tunnel_session
end

Instance Method Details

#==(other) ⇒ Object



36
37
38
# File 'lib/ngrokapi/models/tunnel.rb', line 36

def ==(other)
  @attrs == other.attrs
end

#to_hObject



44
45
46
# File 'lib/ngrokapi/models/tunnel.rb', line 44

def to_h
  @attrs.to_h
end

#to_sObject



40
41
42
# File 'lib/ngrokapi/models/tunnel.rb', line 40

def to_s
  @attrs.to_s
end