Module: Poisol

Extended by:
Poisol
Included in:
Poisol
Defined in:
lib/poisol.rb,
lib/poisol/domain.rb,
lib/poisol/server.rb,
lib/poisol/version.rb,
lib/poisol/stub/stub.rb,
lib/poisol/stub_factory.rb,
lib/poisol/stub/build_stub.rb,
lib/poisol/stub/stub_builder.rb,
lib/poisol/stub_mapper/stubs.rb,
lib/poisol/stub/stub_builder_class.rb,
lib/poisol/stub_config/stub_config.rb,
lib/poisol/stub/request/url_builder.rb,
lib/poisol/stub/request/query_builder.rb,
lib/poisol/stub/stub_builder_instance.rb,
lib/poisol/stub_mapper/request_matcher.rb,
lib/poisol/stub_mapper/response_mapper.rb,
lib/poisol/stub/response/status_builder.rb,
lib/poisol/stub_config/stub_config_builder.rb,
lib/poisol/stub/request/request_body_builder.rb,
lib/poisol/stub/response/array_response_body.rb,
lib/poisol/stub/response/response_body_builder.rb

Defined Under Namespace

Modules: BuildStub, QueryBuilder, RequestBodyBuilder, RequestMatcher, ResponseBodyBuilder, ResponseMapper, Server, StatusBuilder, StubClassBuilder, StubInstance, Stubs, UrlBuilder Classes: Domain, ExtendedServer, Request, RequestConfig, Response, ResponseConfig, Stub, StubBuilder, StubConfig, StubConfigBuilder, StubFactory

Constant Summary collapse

VERSION =
'0.1.13'

Instance Method Summary collapse

Instance Method Details

#load(folder) ⇒ Object



14
15
16
# File 'lib/poisol.rb', line 14

def load folder
  StubFactory.new.build folder 
end

#reset_dataObject



18
19
20
# File 'lib/poisol.rb', line 18

def reset_data
  Stubs.reset
end

#start(param = {:at_port=>3030}) ⇒ Object



9
10
11
12
# File 'lib/poisol.rb', line 9

def start (param={:at_port=>3030})
  Server.start param[:at_port]
  reset_data
end

#stopObject



22
23
24
25
# File 'lib/poisol.rb', line 22

def stop
  Server.stop
  reset_data
end

#wastedObject



27
28
29
# File 'lib/poisol.rb', line 27

def wasted
  Stubs.unused
end