Class: Train::Transports::Mock
- Inherits:
-
Object
- Object
- Train::Transports::Mock
- Defined in:
- lib/train/transports/mock.rb,
lib/train/transports/mock.rb
Defined Under Namespace
Classes: Connection
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(conf = nil) ⇒ Mock
constructor
A new instance of Mock.
- #to_s ⇒ Object
Constructor Details
#initialize(conf = nil) ⇒ Mock
Returns a new instance of Mock.
8 9 10 11 |
# File 'lib/train/transports/mock.rb', line 8 def initialize(conf = nil) @conf = conf || {} trace_calls if @conf[:trace] end |
Instance Method Details
#connection ⇒ Object
13 14 15 |
# File 'lib/train/transports/mock.rb', line 13 def connection @connection ||= Connection.new(@conf) end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/train/transports/mock.rb', line 17 def to_s "Mock Transport" end |