class RKelly::JS::String
Public Class Methods
create(*args)
click to toggle source
# File lib/rkelly/js/string.rb, line 5 def create(*args) self.new(args.first || '') end
new(value)
click to toggle source
Calls superclass method
RKelly::JS::Base.new
# File lib/rkelly/js/string.rb, line 10 def initialize(value) super() self['valueOf'] = value self['valueOf'].function = lambda { value } self['toString'] = value self['fromCharCode'] = unbound_method(:fromCharCode) { |*args| args.map { |x| x.chr }.join } end