Class: Janus::Browser
- Inherits:
-
Object
- Object
- Janus::Browser
- Defined in:
- lib/janus/browser.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(attributes = {}) ⇒ Browser
constructor
A new instance of Browser.
- #to_s ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Browser
Returns a new instance of Browser.
5 6 7 8 9 |
# File 'lib/janus/browser.rb', line 5 def initialize(attributes = {}) @platform = attributes['platform'] @name = attributes['name'] @version = attributes['version'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/janus/browser.rb', line 3 def name @name end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
3 4 5 |
# File 'lib/janus/browser.rb', line 3 def platform @platform end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
3 4 5 |
# File 'lib/janus/browser.rb', line 3 def version @version end |
Instance Method Details
#eql?(other) ⇒ Boolean
11 12 13 |
# File 'lib/janus/browser.rb', line 11 def eql?(other) platform == other.platform && name == other.name && version == other.version end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/janus/browser.rb', line 15 def to_s "#{platform}, #{name} #{version}".strip end |