Class: Mutant::AST::Structure::Node::Fixed Private

Inherits:
Object
  • Object
show all
Includes:
Unparser::Adamantium
Defined in:
lib/mutant/ast/structure.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Direct Known Subclasses

Attribute, Descendant

Defined Under Namespace

Classes: Attribute, Descendant

Instance Method Summary collapse

Instance Method Details

#attribute?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


20
21
22
# File 'lib/mutant/ast/structure.rb', line 20

def attribute?
  instance_of?(Attribute)
end

#descendant?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


24
25
26
# File 'lib/mutant/ast/structure.rb', line 24

def descendant?
  instance_of?(Descendant)
end

#value(node) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



28
29
30
# File 'lib/mutant/ast/structure.rb', line 28

def value(node)
  node.children.at(index)
end