class GraphQL::Language::Nodes::AbstractNode
def inherited(child_class)
def inherited(child_class) super name_underscored = child_class.name .split("::").last .gsub(/([a-z])([A-Z])/,'\1_\2') # insert underscores .downcase # remove caps child_class.module_eval <<-RUBY def visit_method :on_#{name_underscored} end class << self attr_accessor :children_method_name end self.children_method_name = :#{name_underscored}s RUBY end