Class: Train::Plugins::Transport
- Inherits:
-
Object
- Object
- Train::Plugins::Transport
- Includes:
- Extras
- Defined in:
- lib/train/plugins/transport.rb,
lib/train/plugins/base_connection.rb
Defined Under Namespace
Classes: BaseConnection
Class Method Summary collapse
-
.name(name) ⇒ Object
Register the inheriting class with as a train plugin using the provided name.
Instance Method Summary collapse
-
#connection(_options = nil) ⇒ Connection
Create a connection to the target.
-
#initialize(options = {}) ⇒ Transport
constructor
Initialize a new Transport object.
Constructor Details
#initialize(options = {}) ⇒ Transport
Initialize a new Transport object
22 23 24 25 |
# File 'lib/train/plugins/transport.rb', line 22 def initialize( = {}) @options = ({}, || {}) @logger = @options[:logger] || Logger.new(STDOUT) end |
Class Method Details
Instance Method Details
#connection(_options = nil) ⇒ Connection
Create a connection to the target. Options may be provided for additional configuration.
32 33 34 |
# File 'lib/train/plugins/transport.rb', line 32 def connection( = nil) fail Train::ClientError, "#{self.class} does not implement #connect()" end |