Class: NgrokAPI::Models::Endpoint

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Endpoint.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/ngrokapi/models/endpoint.rb', line 26

def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @id = @attrs['id']
  @region = @attrs['region']
  @created_at = @attrs['created_at']
  @updated_at = @attrs['updated_at']
  unless @attrs['public_url'].nil?
    @public_url = URI(@attrs['public_url'])
  end
  @proto = @attrs['proto']
  @hostport = @attrs['hostport']
  @type = @attrs['type']
  @metadata = @attrs['metadata']
  @domain = @attrs['domain']
  @tcp_addr = @attrs['tcp_addr']
  @tunnel = @attrs['tunnel']
  @edge = @attrs['edge']
end

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def attrs
  @attrs
end

#clientObject (readonly)

Returns the value of attribute client.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def client
  @client
end

#created_atObject (readonly)

Returns the value of attribute created_at.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def created_at
  @created_at
end

#domainObject (readonly)

Returns the value of attribute domain.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def domain
  @domain
end

#edgeObject (readonly)

Returns the value of attribute edge.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def edge
  @edge
end

#hostportObject (readonly)

Returns the value of attribute hostport.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def hostport
  @hostport
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def 
  @metadata
end

#protoObject (readonly)

Returns the value of attribute proto.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def proto
  @proto
end

#public_urlObject (readonly)

Returns the value of attribute public_url.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def public_url
  @public_url
end

#regionObject (readonly)

Returns the value of attribute region.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def region
  @region
end

#tcp_addrObject (readonly)

Returns the value of attribute tcp_addr.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def tcp_addr
  @tcp_addr
end

#tunnelObject (readonly)

Returns the value of attribute tunnel.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def tunnel
  @tunnel
end

#typeObject (readonly)

Returns the value of attribute type.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def type
  @type
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



10
11
12
# File 'lib/ngrokapi/models/endpoint.rb', line 10

def updated_at
  @updated_at
end

Instance Method Details

#==(other) ⇒ Object



46
47
48
# File 'lib/ngrokapi/models/endpoint.rb', line 46

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

#to_hObject



54
55
56
# File 'lib/ngrokapi/models/endpoint.rb', line 54

def to_h
  @attrs.to_h
end

#to_sObject



50
51
52
# File 'lib/ngrokapi/models/endpoint.rb', line 50

def to_s
  @attrs.to_s
end