Module: Ki::KiWebBase
- Defined in:
- lib/web/rack_cmd.rb
Instance Method Summary collapse
Instance Method Details
#ki_home ⇒ Object
38 39 40 |
# File 'lib/web/rack_cmd.rb', line 38 def ki_home web_ctx.ki_home end |
#res_url(path) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/web/rack_cmd.rb', line 42 def res_url(path) if path.include?("..") raise "File '#{path}' cannot reference parent directories with '..'!" end "/file/web/#{ RackCommand.web_ctx.resource_hash}/#{self.class.name}:#{path}" end |
#web_ctx ⇒ Object
34 35 36 |
# File 'lib/web/rack_cmd.rb', line 34 def web_ctx RackCommand.web_ctx end |