Module: Wunderbar::API

Included in:
Rack::Builder
Defined in:
lib/wunderbar/script.rb,
lib/wunderbar/environment.rb

Instance Method Summary collapse

Instance Method Details

#_html(*args, &block) ⇒ Object



48
49
50
# File 'lib/wunderbar/environment.rb', line 48

def _html(*args, &block)
  Wunderbar.html(*args, &block)
end

#_js(*args, &block) ⇒ Object



41
42
43
# File 'lib/wunderbar/script.rb', line 41

def _js(*args, &block)
  Wunderbar.ruby2js(*args, &block)
end

#_json(*args, &block) ⇒ Object



56
57
58
# File 'lib/wunderbar/environment.rb', line 56

def _json(*args, &block)
  Wunderbar.json(*args, &block)
end

#_template(name, &block) ⇒ Object



69
70
71
# File 'lib/wunderbar/environment.rb', line 69

def _template(name, &block)
  Wunderbar.templates[name.to_s.gsub('_','-')] = block
end

#_text(*args, &block) ⇒ Object



60
61
62
# File 'lib/wunderbar/environment.rb', line 60

def _text(*args, &block)
  Wunderbar.text(*args, &block)
end

#_websocket(*args, &block) ⇒ Object



64
65
66
67
# File 'lib/wunderbar/environment.rb', line 64

def _websocket(*args, &block)
  args.last[:sync]=args.last.fetch(:sync,true) if Hash === args.last
  Wunderbar.websocket(*args, &block)
end

#_xhtml(*args, &block) ⇒ Object



52
53
54
# File 'lib/wunderbar/environment.rb', line 52

def _xhtml(*args, &block)
  Wunderbar.xhtml(*args, &block)
end