lib/unparser/ast/local_variable_scope.rb
def first_assignment?(node)
        name = node.children.first
        match(node) do |current, before|
          current.include?(name) && !before.include?(name)
        end
      end
# Test if local variable was first at given assignment
#
# @param [Parser::AST::Node] node
#
# @return [Boolean]
#
# @api private
#
Test if local variable was first at given assignment
Test if local variable was first at given assignment
def first_assignment?(node)
        name = node.children.first
        match(node) do |current, before|
          current.include?(name) && !before.include?(name)
        end
      end
def first_assignment? ( node ) name = node . children . first match ( node ) do | current , before | current . include? ( name ) && ! before . include? ( name ) end end
Test if local variable was first at given assignment
Test if local variable was first at given assignment
None
Boolean
node
None
api
None