Class: NgrokAPI::Models::Tunnel
- Inherits:
-
Object
- Object
- NgrokAPI::Models::Tunnel
- Defined in:
- lib/ngrokapi/models/tunnel.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#backends ⇒ Object
readonly
Returns the value of attribute backends.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#forwards_to ⇒ Object
readonly
Returns the value of attribute forwards_to.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#labels ⇒ Object
readonly
Returns the value of attribute labels.
-
#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.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#tunnel_session ⇒ Object
readonly
Returns the value of attribute tunnel_session.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(client: nil, attrs: {}) ⇒ Tunnel
constructor
A new instance of Tunnel.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(client: nil, attrs: {}) ⇒ Tunnel
Returns a new instance of Tunnel.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ngrokapi/models/tunnel.rb', line 24 def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @id = @attrs['id'] unless @attrs['public_url'].nil? @public_url = URI(@attrs['public_url']) end @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
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def attrs @attrs end |
#backends ⇒ Object (readonly)
Returns the value of attribute backends.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def backends @backends end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def client @client end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def endpoint @endpoint end |
#forwards_to ⇒ Object (readonly)
Returns the value of attribute forwards_to.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def forwards_to @forwards_to end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def id @id end |
#labels ⇒ Object (readonly)
Returns the value of attribute labels.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def labels @labels end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def @metadata end |
#proto ⇒ Object (readonly)
Returns the value of attribute proto.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.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/tunnel.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/tunnel.rb', line 10 def region @region end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def started_at @started_at end |
#tunnel_session ⇒ Object (readonly)
Returns the value of attribute tunnel_session.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel.rb', line 10 def tunnel_session @tunnel_session end |
Instance Method Details
#==(other) ⇒ Object
42 43 44 |
# File 'lib/ngrokapi/models/tunnel.rb', line 42 def ==(other) @attrs == other.attrs end |
#to_h ⇒ Object
50 51 52 |
# File 'lib/ngrokapi/models/tunnel.rb', line 50 def to_h @attrs.to_h end |
#to_s ⇒ Object
46 47 48 |
# File 'lib/ngrokapi/models/tunnel.rb', line 46 def to_s @attrs.to_s end |