Class: Browsery::Connector::Config
- Inherits:
-
Object
- Object
- Browsery::Connector::Config
- Defined in:
- lib/browsery/connector.rb
Overview
Simple configuration container for all profiles. Struct is not used here because it contaminates the class with Enumerable methods, which will cause #method_missing in Connector to get confused.
Instance Attribute Summary collapse
-
#connector ⇒ Object
Returns the value of attribute connector.
-
#env ⇒ Object
Returns the value of attribute env.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#hash ⇒ Object
Hashing mechanism should only look at the connector and environment values.
-
#initialize(connector, env) ⇒ Config
constructor
private
Initialize a new configuration object.
Constructor Details
#initialize(connector, env) ⇒ Config
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a new configuration object. This object should never be instantiated directly.
32 33 34 35 |
# File 'lib/browsery/connector.rb', line 32 def initialize(connector, env) @connector = connector @env = env end |
Instance Attribute Details
#connector ⇒ Object
Returns the value of attribute connector.
15 16 17 |
# File 'lib/browsery/connector.rb', line 15 def connector @connector end |
#env ⇒ Object
Returns the value of attribute env.
15 16 17 |
# File 'lib/browsery/connector.rb', line 15 def env @env end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
17 18 19 |
# File 'lib/browsery/connector.rb', line 17 def ==(other) self.class == other.class && self.connector == other.connector && self.env == other.env end |
#hash ⇒ Object
Hashing mechanism should only look at the connector and environment values
24 25 26 |
# File 'lib/browsery/connector.rb', line 24 def hash @connector.hash ^ @env.hash end |