lib/watir/generator/base/visitor.rb in watir-6.19.1 vs lib/watir/generator/base/visitor.rb in watir-7.0.0.beta1
- old
+ new
@@ -52,38 +52,9 @@
def visit_implements_statement(stmt)
# ignored
end
- # TODO: do everything in the visitor somehow?
- # problem is we lack the tag name info while walking the interface AST
- # #
- # # Watir generator visitor interface
- # #
- #
- # def visit_tag(tag_name, interface_name)
- # tag_string = tag.inspect
- # singular = Util.paramify(classify_regexp, tag)
- # plural = singular.pluralize
- # element_class = Util.classify(classify_regexp, interfaces.first.name)
- # collection_class = "#{element_class}Collection"
- #
- # [:defn,
- # :a,
- # [:args, :"*args"],
- # [:scope,
- # [:block,
- # [:call,
- # [:const, :Anchor],
- # :new,
- # [:arglist,
- # [:self],
- # [:call,
- # [:call, nil, :extract_selector, [:arglist, [:lvar, :args]]],
- # :merge,
- # [:arglist, [:hash, [:lit, :tag_name], [:str, "a"]]]]]]]]]
- # end
-
private
def element_class(name, attributes, parent)
[:class, Util.classify(classify_regexp, name), [:const, Util.classify(classify_regexp, parent)],
*attribute_calls(attributes)]