Class: MapLayers::JsExpr
- Inherits:
-
Object
- Object
- MapLayers::JsExpr
- Includes:
- JsWrapper
- Defined in:
- lib/map_layers/js_wrapper.rb
Overview
A valid JavaScript expression that has a value.
Direct Known Subclasses
Constant Summary collapse
- UNDEFINED =
JsExpr.new("undefined")
Instance Attribute Summary
Attributes included from JsWrapper
Instance Method Summary collapse
-
#create ⇒ Object
Returns the javascript expression contained in the object.
-
#initialize(expr) ⇒ JsExpr
constructor
A new instance of JsExpr.
- #to_s ⇒ Object
- #to_str ⇒ Object
Methods included from JsWrapper
#[], #assign_to, #declare, #declare_random, #declared?, escape_javascript, #get_property, javascriptify_method, #javascriptify_method_call, javascriptify_variable, #method_missing, #set_property, #to_javascript, #to_json
Constructor Details
#initialize(expr) ⇒ JsExpr
Returns a new instance of JsExpr.
118 119 120 |
# File 'lib/map_layers/js_wrapper.rb', line 118 def initialize(expr) @variable = expr end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MapLayers::JsWrapper
Instance Method Details
#create ⇒ Object
Returns the javascript expression contained in the object.
122 123 124 |
# File 'lib/map_layers/js_wrapper.rb', line 122 def create @variable end |
#to_s ⇒ Object
125 126 127 |
# File 'lib/map_layers/js_wrapper.rb', line 125 def to_s @variable end |
#to_str ⇒ Object
128 129 130 |
# File 'lib/map_layers/js_wrapper.rb', line 128 def to_str @variable end |