Class: Metamorpher::Terms::Variable

Inherits:
Term
  • Object
show all
Defined in:
lib/metamorpher/terms/variable.rb

Constant Summary collapse

DEFAULT_CONDITION =
->(_) { true }

Instance Attribute Summary

Attributes inherited from Term

#parent

Instance Method Summary collapse

Methods inherited from Term

#alternatives, #path, #with_younger_siblings

Methods included from Rewriter::Substitution

#substitute

Methods included from Rewriter::Replacement

#replace

Methods included from Matcher::Matching

#match

Methods included from Visitable

#accept

Instance Method Details

#inspectObject



10
11
12
13
14
# File 'lib/metamorpher/terms/variable.rb', line 10

def inspect
  name.to_s.upcase +
    (greedy? ? "+" : "") +
    (condition != DEFAULT_CONDITION ? "?" : "")
end