Method: Locomotive::Plugin::ClassMethods#javascript_context

Defined in:
lib/locomotive/plugin.rb

#javascript_contextObject

Override this method to specify ruby objects accessable via the global javascript context. The return value must be a hash whoes keys are the variable names and the values are the objects. The objects will be included in the global context after being prefixed with the plugin_id.

Note:

therubyracer is not able to execute class methods so please ensure
that the objects you pass in are not classes.


118
119
120
# File 'lib/locomotive/plugin.rb', line 118

def javascript_context
  {}
end