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.



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

#connectionObject



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

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

#to_sObject



22
23
24
# File 'lib/train/transports/mock.rb', line 22

def to_s
  'Mock Transport'
end