Module: Deas::Server::ClassMethods
- Defined in:
- lib/deas/server.rb
Instance Method Summary collapse
- #base_url(*args) ⇒ Object
- #configuration ⇒ Object
- #default_charset(*args) ⇒ Object
- #delete(*args, &block) ⇒ Object
- #dump_errors(*args) ⇒ Object
-
#env(*args) ⇒ Object
sinatra settings DSL.
- #error(&block) ⇒ Object
- #get(*args, &block) ⇒ Object
-
#init(&block) ⇒ Object
Server handling DSL.
- #logger(*args) ⇒ Object
- #method_override(*args) ⇒ Object
- #new ⇒ Object
- #patch(*args, &block) ⇒ Object
- #post(*args, &block) ⇒ Object
- #public_root(*args) ⇒ Object
- #put(*args, &block) ⇒ Object
- #redirect(*args, &block) ⇒ Object
- #reload_templates(*args) ⇒ Object
- #root(*args) ⇒ Object
- #route(*args, &block) ⇒ Object
-
#router(value = nil) ⇒ Object
router handling.
- #sessions(*args) ⇒ Object
- #set(name, value) ⇒ Object
- #show_exceptions(*args) ⇒ Object
- #static_files(*args) ⇒ Object
- #template_helper?(helper_module) ⇒ Boolean
- #template_helpers(*helper_modules) ⇒ Object
- #url(*args, &block) ⇒ Object
- #url_for(*args, &block) ⇒ Object
- #use(*args) ⇒ Object
- #verbose_logging(*args) ⇒ Object
- #view_handler_ns(*args) ⇒ Object
- #views_root(*args) ⇒ Object
Instance Method Details
#base_url(*args) ⇒ Object
209 |
# File 'lib/deas/server.rb', line 209 def base_url(*args); self.router.base_url(*args); end |
#configuration ⇒ Object
116 117 118 |
# File 'lib/deas/server.rb', line 116 def configuration @configuration ||= Configuration.new end |
#default_charset(*args) ⇒ Object
197 198 199 |
# File 'lib/deas/server.rb', line 197 def default_charset(*args) self.configuration.default_charset *args end |
#delete(*args, &block) ⇒ Object
218 |
# File 'lib/deas/server.rb', line 218 def delete(*args, &block); self.router.delete(*args, &block); end |
#dump_errors(*args) ⇒ Object
138 139 140 |
# File 'lib/deas/server.rb', line 138 def dump_errors(*args) self.configuration.dump_errors *args end |
#env(*args) ⇒ Object
sinatra settings DSL
122 123 124 |
# File 'lib/deas/server.rb', line 122 def env(*args) self.configuration.env *args end |
#error(&block) ⇒ Object
168 169 170 |
# File 'lib/deas/server.rb', line 168 def error(&block) self.configuration.error_procs << block end |
#get(*args, &block) ⇒ Object
214 |
# File 'lib/deas/server.rb', line 214 def get(*args, &block); self.router.get(*args, &block); end |
#init(&block) ⇒ Object
Server handling DSL
164 165 166 |
# File 'lib/deas/server.rb', line 164 def init(&block) self.configuration.init_procs << block end |
#logger(*args) ⇒ Object
193 194 195 |
# File 'lib/deas/server.rb', line 193 def logger(*args) self.configuration.logger *args end |
#method_override(*args) ⇒ Object
142 143 144 |
# File 'lib/deas/server.rb', line 142 def method_override(*args) self.configuration.method_override *args end |
#new ⇒ Object
112 113 114 |
# File 'lib/deas/server.rb', line 112 def new Deas::SinatraApp.new(self.configuration) end |
#patch(*args, &block) ⇒ Object
217 |
# File 'lib/deas/server.rb', line 217 def patch(*args, &block); self.router.patch(*args, &block); end |
#post(*args, &block) ⇒ Object
215 |
# File 'lib/deas/server.rb', line 215 def post(*args, &block); self.router.post(*args, &block); end |
#public_root(*args) ⇒ Object
130 131 132 |
# File 'lib/deas/server.rb', line 130 def public_root(*args) self.configuration.public_root *args end |
#put(*args, &block) ⇒ Object
216 |
# File 'lib/deas/server.rb', line 216 def put(*args, &block); self.router.put(*args, &block); end |
#redirect(*args, &block) ⇒ Object
221 |
# File 'lib/deas/server.rb', line 221 def redirect(*args, &block); self.router.redirect(*args, &block); end |
#reload_templates(*args) ⇒ Object
158 159 160 |
# File 'lib/deas/server.rb', line 158 def reload_templates(*args) self.configuration.reload_templates *args end |
#root(*args) ⇒ Object
126 127 128 |
# File 'lib/deas/server.rb', line 126 def root(*args) self.configuration.root *args end |
#route(*args, &block) ⇒ Object
220 |
# File 'lib/deas/server.rb', line 220 def route(*args, &block); self.router.route(*args, &block); end |
#router(value = nil) ⇒ Object
router handling
203 204 205 206 |
# File 'lib/deas/server.rb', line 203 def router(value = nil) self.configuration.router = value if !value.nil? self.configuration.router end |
#sessions(*args) ⇒ Object
146 147 148 |
# File 'lib/deas/server.rb', line 146 def sessions(*args) self.configuration.sessions *args end |
#set(name, value) ⇒ Object
185 186 187 |
# File 'lib/deas/server.rb', line 185 def set(name, value) self.configuration.settings[name.to_sym] = value end |
#show_exceptions(*args) ⇒ Object
150 151 152 |
# File 'lib/deas/server.rb', line 150 def show_exceptions(*args) self.configuration.show_exceptions *args end |
#static_files(*args) ⇒ Object
154 155 156 |
# File 'lib/deas/server.rb', line 154 def static_files(*args) self.configuration.static_files *args end |
#template_helper?(helper_module) ⇒ Boolean
177 178 179 |
# File 'lib/deas/server.rb', line 177 def template_helper?(helper_module) self.configuration.template_helpers.include?(helper_module) end |
#template_helpers(*helper_modules) ⇒ Object
172 173 174 175 |
# File 'lib/deas/server.rb', line 172 def template_helpers(*helper_modules) helper_modules.each{ |m| self.configuration.template_helpers << m } self.configuration.template_helpers end |
#url(*args, &block) ⇒ Object
211 |
# File 'lib/deas/server.rb', line 211 def url(*args, &block); self.router.url(*args, &block); end |
#url_for(*args, &block) ⇒ Object
212 |
# File 'lib/deas/server.rb', line 212 def url_for(*args, &block); self.router.url_for(*args, &block); end |
#use(*args) ⇒ Object
181 182 183 |
# File 'lib/deas/server.rb', line 181 def use(*args) self.configuration.middlewares << args end |
#verbose_logging(*args) ⇒ Object
189 190 191 |
# File 'lib/deas/server.rb', line 189 def verbose_logging(*args) self.configuration.verbose_logging *args end |
#view_handler_ns(*args) ⇒ Object
208 |
# File 'lib/deas/server.rb', line 208 def view_handler_ns(*args); self.router.view_handler_ns(*args); end |
#views_root(*args) ⇒ Object
134 135 136 |
# File 'lib/deas/server.rb', line 134 def views_root(*args) self.configuration.views_root *args end |