Class: Gon::Global

Inherits:
Gon
  • Object
show all
Defined in:
lib/gon/global.rb

Constant Summary

Constants inherited from Gon

VERSION

Class Method Summary collapse

Methods inherited from Gon

global, merge_variable, method_missing, push, watch

Class Method Details

.all_variablesObject



5
6
7
# File 'lib/gon/global.rb', line 5

def all_variables
  @global_vars || {}
end

.clearObject



9
10
11
# File 'lib/gon/global.rb', line 9

def clear
  @global_vars = {}
end

.inspectObject



13
14
15
# File 'lib/gon/global.rb', line 13

def inspect
  'Gon::Global'
end

.jbuilder(*args) ⇒ Object



22
23
24
25
26
# File 'lib/gon/global.rb', line 22

def jbuilder(*args)
  ensure_template_handler_is_defined
  data, options = Gon::Jbuilder.handler(args, true)
  store_builder_data 'jbuilder', data, options
end

.rabl(*args) ⇒ Object



17
18
19
20
# File 'lib/gon/global.rb', line 17

def rabl(*args)
  data, options = Gon::Rabl.handler(args, true)
  store_builder_data 'rabl', data, options
end