Class: NgrokAPI::Models::UserAgent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attrsObject (readonly)

Returns the value of attribute attrs.



8
9
10
# File 'lib/ngrokapi/models/user_agent.rb', line 8

def attrs
  @attrs
end

#browser_nameObject (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_versionObject (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

#clientObject (readonly)

Returns the value of attribute client.



8
9
10
# File 'lib/ngrokapi/models/user_agent.rb', line 8

def client
  @client
end

#device_typeObject (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_nameObject (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_versionObject (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

#rawObject (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_hObject



36
37
38
# File 'lib/ngrokapi/models/user_agent.rb', line 36

def to_h
  @attrs.to_h
end

#to_sObject



32
33
34
# File 'lib/ngrokapi/models/user_agent.rb', line 32

def to_s
  @attrs.to_s
end