Module: WAB
- Defined in:
- lib/wab.rb,
lib/wab/io.rb,
lib/wab/ui.rb,
lib/wab/data.rb,
lib/wab/impl.rb,
lib/wab/uuid.rb,
lib/wab/shell.rb,
lib/wab/utils.rb,
lib/wab/client.rb,
lib/wab/errors.rb,
lib/wab/racker.rb,
lib/wab/io/call.rb,
lib/wab/ui/flow.rb,
lib/wab/ui/list.rb,
lib/wab/ui/view.rb,
lib/wab/version.rb,
lib/wab/io/shell.rb,
lib/wab/impl/agoo.rb,
lib/wab/impl/data.rb,
lib/wab/impl/expr.rb,
lib/wab/impl/init.rb,
lib/wab/io/engine.rb,
lib/wab/ui/create.rb,
lib/wab/ui/update.rb,
lib/wab/controller.rb,
lib/wab/impl/model.rb,
lib/wab/impl/shell.rb,
lib/wab/impl/utils.rb,
lib/wab/ui/display.rb,
lib/wab/impl/sinatra.rb,
lib/wab/impl/webrick.rb,
lib/wab/shell_logger.rb,
lib/wab/ui/rest_flow.rb,
lib/wab/impl/exprs/eq.rb,
lib/wab/impl/exprs/gt.rb,
lib/wab/impl/exprs/in.rb,
lib/wab/impl/exprs/lt.rb,
lib/wab/impl/exprs/or.rb,
lib/wab/ui/multi_flow.rb,
lib/wab/impl/bool_expr.rb,
lib/wab/impl/exprs/and.rb,
lib/wab/impl/exprs/gte.rb,
lib/wab/impl/exprs/has.rb,
lib/wab/impl/exprs/lte.rb,
lib/wab/impl/exprs/not.rb,
lib/wab/impl/path_expr.rb,
lib/wab/impl/rack_error.rb,
lib/wab/open_controller.rb,
lib/wab/impl/agoo/sender.rb,
lib/wab/impl/agoo/server.rb,
lib/wab/impl/expr_parser.rb,
lib/wab/impl/exprs/regex.rb,
lib/wab/impl/agoo/handler.rb,
lib/wab/impl/rack_handler.rb,
lib/wab/impl/configuration.rb,
lib/wab/impl/exprs/between.rb,
lib/wab/impl/sinatra/sender.rb,
lib/wab/impl/sinatra/server.rb,
lib/wab/impl/webrick/sender.rb,
lib/wab/impl/webrick/server.rb,
lib/wab/impl/sinatra/handler.rb,
lib/wab/impl/webrick/handler.rb,
lib/wab/impl/agoo/tql_handler.rb,
lib/wab/impl/agoo/export_proxy.rb,
lib/wab/impl/sinatra/tql_handler.rb,
lib/wab/impl/webrick/tql_handler.rb,
lib/wab/impl/sinatra/export_proxy.rb,
lib/wab/impl/webrick/export_proxy.rb
Overview
Web Application Builder
Defined Under Namespace
Modules: IO, Impl, ShellLogger, UI, Utils Classes: ArgError, Client, Controller, Data, DuplicateError, ForbiddenError, KeyError, OpenController, Racker, Shell, TypeError, UUID
Constant Summary collapse
- Error =
Base for WAB errors and exceptions.
Class.new(StandardError)
- ParseError =
Raised as a result of a error while parsing.
Class.new(Error)
- VERSION =
Current version of the module.
'0.7.0'
Class Method Summary collapse
-
.get_export(path) ⇒ Object
Returns a file contents from the gem export directory.
Class Method Details
.get_export(path) ⇒ Object
Returns a file contents from the gem export directory.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/wab.rb', line 6 def self.get_export(path) if path.nil? || path.empty? path = '/index.html' elsif !path.start_with?('/') path = "/#{path}" end raise ForbiddenError.new(path) if path.include?('..') path = File.("#{__dir__}/../export#{path}") begin File.open(path) { |f| f.read() } rescue Exception nil end end |