Class: NgrokAPI::Models::UserAgent
- Inherits:
-
Object
- Object
- NgrokAPI::Models::UserAgent
- Defined in:
- lib/ngrokapi/models/user_agent.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#browser_name ⇒ Object
readonly
Returns the value of attribute browser_name.
-
#browser_version ⇒ Object
readonly
Returns the value of attribute browser_version.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#device_type ⇒ Object
readonly
Returns the value of attribute device_type.
-
#os_name ⇒ Object
readonly
Returns the value of attribute os_name.
-
#os_version ⇒ Object
readonly
Returns the value of attribute os_version.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(client: nil, attrs: {}) ⇒ UserAgent
constructor
A new instance of UserAgent.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(client: nil, attrs: {}) ⇒ UserAgent
Returns a new instance of UserAgent.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ngrokapi/models/user_agent.rb', line 17 def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @raw = @attrs['raw'] @browser_name = @attrs['browser_name'] @browser_version = @attrs['browser_version'] @device_type = @attrs['device_type'] @os_name = @attrs['os_name'] @os_version = @attrs['os_version'] end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
8 9 10 |
# File 'lib/ngrokapi/models/user_agent.rb', line 8 def attrs @attrs end |
#browser_name ⇒ Object (readonly)
Returns the value of attribute browser_name.
8 9 10 |
# File 'lib/ngrokapi/models/user_agent.rb', line 8 def browser_name @browser_name end |
#browser_version ⇒ Object (readonly)
Returns the value of attribute browser_version.
8 9 10 |
# File 'lib/ngrokapi/models/user_agent.rb', line 8 def browser_version @browser_version end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
8 9 10 |
# File 'lib/ngrokapi/models/user_agent.rb', line 8 def client @client end |
#device_type ⇒ Object (readonly)
Returns the value of attribute device_type.
8 9 10 |
# File 'lib/ngrokapi/models/user_agent.rb', line 8 def device_type @device_type end |
#os_name ⇒ Object (readonly)
Returns the value of attribute os_name.
8 9 10 |
# File 'lib/ngrokapi/models/user_agent.rb', line 8 def os_name @os_name end |
#os_version ⇒ Object (readonly)
Returns the value of attribute os_version.
8 9 10 |
# File 'lib/ngrokapi/models/user_agent.rb', line 8 def os_version @os_version end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
8 9 10 |
# File 'lib/ngrokapi/models/user_agent.rb', line 8 def raw @raw end |
Instance Method Details
#==(other) ⇒ Object
28 29 30 |
# File 'lib/ngrokapi/models/user_agent.rb', line 28 def ==(other) @attrs == other.attrs end |
#to_h ⇒ Object
36 37 38 |
# File 'lib/ngrokapi/models/user_agent.rb', line 36 def to_h @attrs.to_h end |
#to_s ⇒ Object
32 33 34 |
# File 'lib/ngrokapi/models/user_agent.rb', line 32 def to_s @attrs.to_s end |