Class: TwitterCldr::Utils::RegexpAst::Node
- Inherits:
-
Object
- Object
- TwitterCldr::Utils::RegexpAst::Node
- Defined in:
- lib/twitter_cldr/utils/regexp_ast.rb
Direct Known Subclasses
Alternation, Alternative, Capture, CharacterSet, Digit, Literal, Passive, Root, Sequence, Word
Instance Attribute Summary collapse
-
#expressions ⇒ Object
readonly
Returns the value of attribute expressions.
-
#quantifier ⇒ Object
readonly
Returns the value of attribute quantifier.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(expressions, quantifier) ⇒ Node
constructor
A new instance of Node.
- #quantified? ⇒ Boolean
Constructor Details
#initialize(expressions, quantifier) ⇒ Node
Returns a new instance of Node.
23 24 25 26 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 23 def initialize(expressions, quantifier) @expressions = expressions @quantifier = quantifier end |
Instance Attribute Details
#expressions ⇒ Object (readonly)
Returns the value of attribute expressions.
21 22 23 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 21 def expressions @expressions end |
#quantifier ⇒ Object (readonly)
Returns the value of attribute quantifier.
21 22 23 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 21 def quantifier @quantifier end |
Class Method Details
.from_parser_node(node, expressions) ⇒ Object
32 33 34 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 32 def self.from_parser_node(node, expressions) new(expressions, Quantifier.from_parser_node(node)) end |
Instance Method Details
#quantified? ⇒ Boolean
28 29 30 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 28 def quantified? !!quantifier end |