Class: Distant::Connection
- Inherits:
-
Object
- Object
- Distant::Connection
- Includes:
- HTTParty
- Defined in:
- lib/distant/connection.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(config) ⇒ Connection
Returns a new instance of Connection.
7 8 9 10 11 |
# File 'lib/distant/connection.rb', line 7 def initialize(config) raise ArgumentError.new 'invalid config' unless config.is_a? Distant::Config self.config = config self.class.base_uri config.base_uri end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
6 7 8 |
# File 'lib/distant/connection.rb', line 6 def config @config end |