Class: Minjs::ECMA262::WhiteSpace
- Defined in:
- lib/minjs/ecma262/literal.rb
Overview
Class of ECMA262 WhiteSpace element
Every WhiteSpace characters in source elements is converted to this class object.
This class is singleton and representation string is u0020.
Constant Summary collapse
- @@instance =
self.new()
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.get ⇒ Object
get instance.
Instance Method Summary collapse
-
#==(obj) ⇒ Object
compare object.
-
#to_js(options = {}) ⇒ Object
Returns a ECMAScript string containg the representation of element.
-
#traverse(parent, &block) ⇒ Object
Traverses this children and itself with given block.
-
#ws? ⇒ Boolean
true if literal is white space.
Methods inherited from Literal
#lt?, #priority, #side_effect?
Methods inherited from Base
#add_remove_paren, #concat, #deep_dup, #replace
Class Method Details
.get ⇒ Object
get instance
92 93 94 |
# File 'lib/minjs/ecma262/literal.rb', line 92 def self.get @@instance end |
Instance Method Details
#==(obj) ⇒ Object
compare object
79 80 81 |
# File 'lib/minjs/ecma262/literal.rb', line 79 def ==(obj) self.class == obj.class end |
#to_js(options = {}) ⇒ Object
Returns a ECMAScript string containg the representation of element.
85 86 87 |
# File 'lib/minjs/ecma262/literal.rb', line 85 def to_js( = {}) " " end |
#traverse(parent, &block) ⇒ Object
Traverses this children and itself with given block.
70 71 |
# File 'lib/minjs/ecma262/literal.rb', line 70 def traverse(parent, &block) end |
#ws? ⇒ Boolean
true if literal is white space
74 75 76 |
# File 'lib/minjs/ecma262/literal.rb', line 74 def ws? true end |