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
- #template_source(*args) ⇒ 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
216 |
# File 'lib/deas/server.rb', line 216 def base_url(*args); self.router.base_url(*args); end |
#configuration ⇒ Object
119 120 121 |
# File 'lib/deas/server.rb', line 119 def configuration @configuration ||= Configuration.new end |
#default_charset(*args) ⇒ Object
200 201 202 |
# File 'lib/deas/server.rb', line 200 def default_charset(*args) self.configuration.default_charset *args end |
#delete(*args, &block) ⇒ Object
225 |
# File 'lib/deas/server.rb', line 225 def delete(*args, &block); self.router.delete(*args, &block); end |
#dump_errors(*args) ⇒ Object
141 142 143 |
# File 'lib/deas/server.rb', line 141 def dump_errors(*args) self.configuration.dump_errors *args end |
#env(*args) ⇒ Object
sinatra settings DSL
125 126 127 |
# File 'lib/deas/server.rb', line 125 def env(*args) self.configuration.env *args end |
#error(&block) ⇒ Object
171 172 173 |
# File 'lib/deas/server.rb', line 171 def error(&block) self.configuration.error_procs << block end |
#get(*args, &block) ⇒ Object
221 |
# File 'lib/deas/server.rb', line 221 def get(*args, &block); self.router.get(*args, &block); end |
#init(&block) ⇒ Object
Server handling DSL
167 168 169 |
# File 'lib/deas/server.rb', line 167 def init(&block) self.configuration.init_procs << block end |
#logger(*args) ⇒ Object
196 197 198 |
# File 'lib/deas/server.rb', line 196 def logger(*args) self.configuration.logger *args end |
#method_override(*args) ⇒ Object
145 146 147 |
# File 'lib/deas/server.rb', line 145 def method_override(*args) self.configuration.method_override *args end |
#new ⇒ Object
115 116 117 |
# File 'lib/deas/server.rb', line 115 def new Deas::SinatraApp.new(self.configuration) end |
#patch(*args, &block) ⇒ Object
224 |
# File 'lib/deas/server.rb', line 224 def patch(*args, &block); self.router.patch(*args, &block); end |
#post(*args, &block) ⇒ Object
222 |
# File 'lib/deas/server.rb', line 222 def post(*args, &block); self.router.post(*args, &block); end |
#public_root(*args) ⇒ Object
133 134 135 |
# File 'lib/deas/server.rb', line 133 def public_root(*args) self.configuration.public_root *args end |
#put(*args, &block) ⇒ Object
223 |
# File 'lib/deas/server.rb', line 223 def put(*args, &block); self.router.put(*args, &block); end |
#redirect(*args, &block) ⇒ Object
228 |
# File 'lib/deas/server.rb', line 228 def redirect(*args, &block); self.router.redirect(*args, &block); end |
#reload_templates(*args) ⇒ Object
161 162 163 |
# File 'lib/deas/server.rb', line 161 def reload_templates(*args) self.configuration.reload_templates *args end |
#root(*args) ⇒ Object
129 130 131 |
# File 'lib/deas/server.rb', line 129 def root(*args) self.configuration.root *args end |
#route(*args, &block) ⇒ Object
227 |
# File 'lib/deas/server.rb', line 227 def route(*args, &block); self.router.route(*args, &block); end |
#router(value = nil) ⇒ Object
router handling
210 211 212 213 |
# File 'lib/deas/server.rb', line 210 def router(value = nil) self.configuration.router = value if !value.nil? self.configuration.router end |
#sessions(*args) ⇒ Object
149 150 151 |
# File 'lib/deas/server.rb', line 149 def sessions(*args) self.configuration.sessions *args end |
#set(name, value) ⇒ Object
188 189 190 |
# File 'lib/deas/server.rb', line 188 def set(name, value) self.configuration.settings[name.to_sym] = value end |
#show_exceptions(*args) ⇒ Object
153 154 155 |
# File 'lib/deas/server.rb', line 153 def show_exceptions(*args) self.configuration.show_exceptions *args end |
#static_files(*args) ⇒ Object
157 158 159 |
# File 'lib/deas/server.rb', line 157 def static_files(*args) self.configuration.static_files *args end |
#template_helper?(helper_module) ⇒ Boolean
180 181 182 |
# File 'lib/deas/server.rb', line 180 def template_helper?(helper_module) self.configuration.template_helpers.include?(helper_module) end |
#template_helpers(*helper_modules) ⇒ Object
175 176 177 178 |
# File 'lib/deas/server.rb', line 175 def template_helpers(*helper_modules) helper_modules.each{ |m| self.configuration.template_helpers << m } self.configuration.template_helpers end |
#template_source(*args) ⇒ Object
204 205 206 |
# File 'lib/deas/server.rb', line 204 def template_source(*args) self.configuration.template_source *args end |
#url(*args, &block) ⇒ Object
218 |
# File 'lib/deas/server.rb', line 218 def url(*args, &block); self.router.url(*args, &block); end |
#url_for(*args, &block) ⇒ Object
219 |
# File 'lib/deas/server.rb', line 219 def url_for(*args, &block); self.router.url_for(*args, &block); end |
#use(*args) ⇒ Object
184 185 186 |
# File 'lib/deas/server.rb', line 184 def use(*args) self.configuration.middlewares << args end |
#verbose_logging(*args) ⇒ Object
192 193 194 |
# File 'lib/deas/server.rb', line 192 def verbose_logging(*args) self.configuration.verbose_logging *args end |
#view_handler_ns(*args) ⇒ Object
215 |
# File 'lib/deas/server.rb', line 215 def view_handler_ns(*args); self.router.view_handler_ns(*args); end |
#views_root(*args) ⇒ Object
137 138 139 |
# File 'lib/deas/server.rb', line 137 def views_root(*args) self.configuration.views_root *args end |