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
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/train/plugins/transport.rb', line 21 def initialize( = {}) @options = ({}, || {}) @logger = @options[:logger] || Logger.new($stdout, level: :fatal) # Validates audit log configuration options if audit log is enabled # The reason to implement different validate method for audit log options is # to validate only audit log options and not to break any existing validate_option implementation. if !@options.empty? && @options[:enable_audit_log] () end end |
Class Method Details
Instance Method Details
#connection(_options = nil) ⇒ Connection
Create a connection to the target. Options may be provided for additional configuration.
37 38 39 |
# File 'lib/train/plugins/transport.rb', line 37 def connection( = nil) raise Train::ClientError, "#{self.class} does not implement #connection()" end |