Class Ym4r::MapstractionPlugin::Variable
In: lib/mapstraction_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/mapstraction_plugin/mapping.rb, line 104
104:       def initialize(variable)
105:         @variable = variable
106:       end

Public Instance methods

Returns the javascript expression contained in the object.

[Source]

     # File lib/mapstraction_plugin/mapping.rb, line 108
108:       def create
109:         @variable
110:       end

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

[Source]

     # File lib/mapstraction_plugin/mapping.rb, line 112
112:       def to_s
113:         @variable + ";"
114:       end

[Validate]