Module: Mull

Extended by:
Mull
Included in:
Mull
Defined in:
lib/mull.rb,
lib/mull/cli.rb,
lib/mull/request.rb,
lib/mull/version.rb,
lib/mull/file_util.rb

Defined Under Namespace

Modules: Container Classes: Cli, FileUtil, Request

Constant Summary collapse

VERSION =
"0.1.0"

Instance Method Summary collapse

Instance Method Details

#requestsObject



55
56
57
58
59
# File 'lib/mull.rb', line 55

def requests
  @requests ||= Container.config(:requests).map do |d|
    Container.request(definition: d)
  end
end

#responsesObject



61
62
63
64
65
# File 'lib/mull.rb', line 61

def responses
  @responses ||= Container.config(:requests).map do |d|
    Container.response(definition: d)
  end
end

#save_allObject



67
68
69
# File 'lib/mull.rb', line 67

def save_all
  requests.each(&:save_response!)
end

#serverObject



71
72
73
74
# File 'lib/mull.rb', line 71

def server
  responses.each(&:map_server_route)
  Container.server.run!
end