Class: UserAgentSanitizer::UserAgent
- Inherits:
-
Object
- Object
- UserAgentSanitizer::UserAgent
- Defined in:
- lib/user_agent_sanitizer.rb
Instance Attribute Summary collapse
-
#brand ⇒ Object
Returns the value of attribute brand.
-
#model ⇒ Object
Returns the value of attribute model.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize(user_agent) ⇒ UserAgent
constructor
A new instance of UserAgent.
- #to_s ⇒ Object
Constructor Details
#initialize(user_agent) ⇒ UserAgent
Returns a new instance of UserAgent.
24 25 26 |
# File 'lib/user_agent_sanitizer.rb', line 24 def initialize(user_agent) @user_agent = user_agent.dup end |
Instance Attribute Details
#brand ⇒ Object
Returns the value of attribute brand.
22 23 24 |
# File 'lib/user_agent_sanitizer.rb', line 22 def brand @brand end |
#model ⇒ Object
Returns the value of attribute model.
22 23 24 |
# File 'lib/user_agent_sanitizer.rb', line 22 def model @model end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
22 23 24 |
# File 'lib/user_agent_sanitizer.rb', line 22 def user_agent @user_agent end |
Instance Method Details
#to_s ⇒ Object
38 39 40 |
# File 'lib/user_agent_sanitizer.rb', line 38 def to_s "#{brand} #{model}".strip end |