Class: KcoRuby::UserAgentField
- Inherits:
-
Object
- Object
- KcoRuby::UserAgentField
- Defined in:
- lib/kco_ruby/user_agent.rb
Overview
The field class is used to describe a UserAgent field
Instance Attribute Summary collapse
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
writeonly
Sets the attribute options.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(identifier, name, version, options = nil) ⇒ UserAgentField
constructor
A new instance of UserAgentField.
- #options_as_string ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(identifier, name, version, options = nil) ⇒ UserAgentField
32 33 34 35 36 37 |
# File 'lib/kco_ruby/user_agent.rb', line 32 def initialize(identifier, name, version, = nil) @identifier = identifier @name = name @version = version = end |
Instance Attribute Details
#identifier ⇒ Object
Returns the value of attribute identifier.
29 30 31 |
# File 'lib/kco_ruby/user_agent.rb', line 29 def identifier @identifier end |
#name ⇒ Object
Returns the value of attribute name.
29 30 31 |
# File 'lib/kco_ruby/user_agent.rb', line 29 def name @name end |
#options=(value) ⇒ Object (writeonly)
Sets the attribute options
30 31 32 |
# File 'lib/kco_ruby/user_agent.rb', line 30 def (value) = value end |
#version ⇒ Object
Returns the value of attribute version.
29 30 31 |
# File 'lib/kco_ruby/user_agent.rb', line 29 def version @version end |
Instance Method Details
#options_as_string ⇒ Object
43 44 45 |
# File 'lib/kco_ruby/user_agent.rb', line 43 def "(#{@options.join(" ; ")})" if end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/kco_ruby/user_agent.rb', line 39 def to_s ["#{@identifier}/#{@name}_#{@version}", ].join(" ").strip end |