Class: NgrokAPI::Models::TunnelSession
- Inherits:
-
Object
- Object
- NgrokAPI::Models::TunnelSession
- Defined in:
- lib/ngrokapi/models/tunnel_session.rb
Instance Attribute Summary collapse
-
#agent_version ⇒ Object
readonly
Returns the value of attribute agent_version.
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#credential ⇒ Object
readonly
Returns the value of attribute credential.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#os ⇒ Object
readonly
Returns the value of attribute os.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#transport ⇒ Object
readonly
Returns the value of attribute transport.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(client: nil, attrs: {}) ⇒ TunnelSession
constructor
A new instance of TunnelSession.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(client: nil, attrs: {}) ⇒ TunnelSession
Returns a new instance of TunnelSession.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 23 def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @agent_version = @attrs['agent_version'] @credential = @attrs['credential'] @id = @attrs['id'] @ip = @attrs['ip'] @metadata = @attrs['metadata'] @os = @attrs['os'] @region = @attrs['region'] @started_at = @attrs['started_at'] @transport = @attrs['transport'] unless @attrs['uri'].nil? @uri = URI(@attrs['uri']) end end |
Instance Attribute Details
#agent_version ⇒ Object (readonly)
Returns the value of attribute agent_version.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def agent_version @agent_version end |
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def attrs @attrs end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def client @client end |
#credential ⇒ Object (readonly)
Returns the value of attribute credential.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def credential @credential end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def id @id end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def ip @ip end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def @metadata end |
#os ⇒ Object (readonly)
Returns the value of attribute os.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def os @os end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.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_session.rb', line 10 def started_at @started_at end |
#transport ⇒ Object (readonly)
Returns the value of attribute transport.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def transport @transport end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
10 11 12 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object
40 41 42 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 40 def ==(other) @attrs == other.attrs end |
#to_h ⇒ Object
48 49 50 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 48 def to_h @attrs.to_h end |
#to_s ⇒ Object
44 45 46 |
# File 'lib/ngrokapi/models/tunnel_session.rb', line 44 def to_s @attrs.to_s end |