Class: Train::Transports::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/train/transports/mock.rb,
lib/train/transports/mock.rb

Defined Under Namespace

Classes: Connection

Instance Method Summary collapse

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

#connectionObject



13
14
15
# File 'lib/train/transports/mock.rb', line 13

def connection
  @connection ||= Connection.new(@conf)
end

#to_sObject



17
18
19
# File 'lib/train/transports/mock.rb', line 17

def to_s
  "Mock Transport"
end