Class: TwitterCldr::Utils::RegexpAst::Literal
- Defined in:
- lib/twitter_cldr/utils/regexp_ast.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Node
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(expressions, quantifier, text) ⇒ Literal
constructor
A new instance of Literal.
Methods inherited from Node
Constructor Details
#initialize(expressions, quantifier, text) ⇒ Literal
Returns a new instance of Literal.
75 76 77 78 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 75 def initialize(expressions, quantifier, text) @text = text super(expressions, quantifier) end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
73 74 75 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 73 def text @text end |
Class Method Details
.from_parser_node(node, expressions) ⇒ Object
80 81 82 83 84 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 80 def self.from_parser_node(node, expressions) new( expressions, Quantifier.from_parser_node(node), node.text ) end |