script(src='assets/opal-parser.js') body button | click me script(type='text/ruby') | Document.ready? do Element.find('button').on(:click) do |evt| h1 = Element.new(:h1) h1.text = 'Hello world' Element.find('body').append(h1) evt.current_target.remove end end
right = number.to_s.split('.') left = left.gsub(DELIMITED_REGEX) do |digit_to_delimit| "#{digit_to_delimit}#{options[:delimiter]}" end [left, right].compact end end end end gsub! -> gsub