Class: MetaCommit::Contracts::ContextualAst

Inherits:
Object
  • Object
show all
Defined in:
lib/meta_commit_contracts/contextual_ast.rb

Overview

Stores specific node from ast and all nodes bypassed on the way to target node Instances of this class are passed to Diff#supports_change

Instance Attribute Summary collapse

Instance Attribute Details

#context_nodesArray<MetaCommit::Contracts::Ast>

Nodes bypassed on the way to target node

Returns:



8
9
10
# File 'lib/meta_commit_contracts/contextual_ast.rb', line 8

def context_nodes
  @context_nodes
end

#parser_classClass

used to parse target node

Returns:

  • (Class)

    the current value of parser_class



8
9
10
# File 'lib/meta_commit_contracts/contextual_ast.rb', line 8

def parser_class
  @parser_class
end

#target_nodeMetaCommit::Contracts::Ast

Target node from AST

Returns:



8
9
10
# File 'lib/meta_commit_contracts/contextual_ast.rb', line 8

def target_node
  @target_node
end

#whole_file_changeBoolean

Returns the current value of whole_file_change.

Returns:

  • (Boolean)

    the current value of whole_file_change



8
9
10
# File 'lib/meta_commit_contracts/contextual_ast.rb', line 8

def whole_file_change
  @whole_file_change
end