module Rails5XHRUpdate
Provide some helper methods to the module
Provide the XHRToRails5
class.
Constants
- AST_TRUE
- VERSION
Public Class Methods
ast_pair(name, data)
click to toggle source
# File lib/rails5_xhr_update/util.rb, line 5 def self.ast_pair(name, data) Parser::AST::Node.new(:pair, [Parser::AST::Node.new(:sym, [name]), data]) end
ast_to_string(ast)
click to toggle source
# File lib/rails5_xhr_update/util.rb, line 9 def self.ast_to_string(ast) string = Unparser.unparse(ast)[0..-2] string[string.index('(')] = ' ' string end