Module: Wunderbar::API
- Included in:
- Rack::Builder
- Defined in:
- lib/wunderbar/script.rb,
lib/wunderbar/environment.rb
Instance Method Summary collapse
- #_file(name, options = {}, &block) ⇒ Object
- #_html(*args, &block) ⇒ Object
- #_js(*args, &block) ⇒ Object
- #_json(*args, &block) ⇒ Object
- #_template(name, &block) ⇒ Object
- #_text(*args, &block) ⇒ Object
- #_websocket(*args, &block) ⇒ Object
- #_xhtml(*args, &block) ⇒ Object
Instance Method Details
#_file(name, options = {}, &block) ⇒ Object
52 53 54 55 |
# File 'lib/wunderbar/environment.rb', line 52 def _file(name, ={}, &block) [:source] = block if block .files[name] = end |
#_html(*args, &block) ⇒ Object
27 28 29 |
# File 'lib/wunderbar/environment.rb', line 27 def _html(*args, &block) .html(*args, &block) end |
#_js(*args, &block) ⇒ Object
45 46 47 |
# File 'lib/wunderbar/script.rb', line 45 def _js(*args, &block) .ruby2js(*args, &block) end |
#_json(*args, &block) ⇒ Object
35 36 37 |
# File 'lib/wunderbar/environment.rb', line 35 def _json(*args, &block) .json(*args, &block) end |
#_template(name, &block) ⇒ Object
48 49 50 |
# File 'lib/wunderbar/environment.rb', line 48 def _template(name, &block) .templates[name.to_s.gsub('_','-')] = block end |
#_text(*args, &block) ⇒ Object
39 40 41 |
# File 'lib/wunderbar/environment.rb', line 39 def _text(*args, &block) .text(*args, &block) end |
#_websocket(*args, &block) ⇒ Object
43 44 45 46 |
# File 'lib/wunderbar/environment.rb', line 43 def _websocket(*args, &block) args.last[:sync]=args.last.fetch(:sync,true) if Hash === args.last .websocket(*args, &block) end |
#_xhtml(*args, &block) ⇒ Object
31 32 33 |
# File 'lib/wunderbar/environment.rb', line 31 def _xhtml(*args, &block) .xhtml(*args, &block) end |