Class: Regex::AtomicExpression

Inherits:
Expression show all
Defined in:
lib/regex/atomic_expression.rb

Overview

Abstract class. A valid regular expression that cannot be further decomposed into sub-expressions.

Direct Known Subclasses

Anchor, CharShorthand, Character, Wildcard

Instance Attribute Summary

Attributes inherited from Expression

#begin_anchor, #end_anchor

Instance Method Summary collapse

Methods inherited from Expression

#cardinality, #initialize, #options, #to_str

Constructor Details

This class inherits a constructor from Regex::Expression

Instance Method Details

#atomic?Boolean

Redefined method. Return true since it may not have any child.

Returns:

  • (Boolean)


10
11
12
# File 'lib/regex/atomic_expression.rb', line 10

def atomic?
  return true
end