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.
13 14 15 16 |
# File 'lib/train/transports/mock.rb', line 13 def initialize(conf = nil) @conf = conf || {} trace_calls if @conf[:trace] end |
Instance Method Details
#connection ⇒ Object
18 19 20 |
# File 'lib/train/transports/mock.rb', line 18 def connection @connection ||= Connection.new(@conf) end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/train/transports/mock.rb', line 22 def to_s 'Mock Transport' end |