Class Ym4r::GmPlugin::Variable
In: lib/gm_plugin/mapping.rb
Parent: Object

Used to bind a ruby variable to an already existing JavaScript one. It doesn’t have to be a variable in the sense "var variable" but it can be any valid JavaScript expression that has a value.

Methods

create   new   to_s  

Included Modules

MappingObject

Constants

UNDEFINED = Variable.new("undefined")

Public Class methods

[Source]

     # File lib/gm_plugin/mapping.rb, line 112
112:       def initialize(variable)
113:         @variable = variable
114:       end

Public Instance methods

Returns the javascript expression contained in the object.

[Source]

     # File lib/gm_plugin/mapping.rb, line 116
116:       def create
117:         @variable
118:       end

Returns the expression inside the Variable followed by a ";"

[Source]

     # File lib/gm_plugin/mapping.rb, line 120
120:       def to_s
121:         @variable + ";"
122:       end

[Validate]