Class: NgrokAPI::Models::Endpoint
- Inherits:
-
Object
- Object
- NgrokAPI::Models::Endpoint
- Defined in:
- lib/ngrokapi/models/endpoint.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#edge ⇒ Object
readonly
Returns the value of attribute edge.
-
#hostport ⇒ Object
readonly
Returns the value of attribute hostport.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#proto ⇒ Object
readonly
Returns the value of attribute proto.
-
#public_url ⇒ Object
readonly
Returns the value of attribute public_url.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#tcp_addr ⇒ Object
readonly
Returns the value of attribute tcp_addr.
-
#tunnel ⇒ Object
readonly
Returns the value of attribute tunnel.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(client: nil, attrs: {}) ⇒ Endpoint
constructor
A new instance of Endpoint.
- #to_h ⇒ Object
- #to_s ⇒ Object
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
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def attrs @attrs end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def client @client end |
#created_at ⇒ Object (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 |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def domain @domain end |
#edge ⇒ Object (readonly)
Returns the value of attribute edge.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def edge @edge end |
#hostport ⇒ Object (readonly)
Returns the value of attribute hostport.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def hostport @hostport end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def @metadata end |
#proto ⇒ Object (readonly)
Returns the value of attribute proto.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def proto @proto end |
#public_url ⇒ Object (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 |
#region ⇒ Object (readonly)
Returns the value of attribute region.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def region @region end |
#tcp_addr ⇒ Object (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 |
#tunnel ⇒ Object (readonly)
Returns the value of attribute tunnel.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def tunnel @tunnel end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
10 11 12 |
# File 'lib/ngrokapi/models/endpoint.rb', line 10 def type @type end |
#updated_at ⇒ Object (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_h ⇒ Object
54 55 56 |
# File 'lib/ngrokapi/models/endpoint.rb', line 54 def to_h @attrs.to_h end |
#to_s ⇒ Object
50 51 52 |
# File 'lib/ngrokapi/models/endpoint.rb', line 50 def to_s @attrs.to_s end |