Class: TwitterCldr::Utils::RegexpAst::Quantifier
- Inherits:
-
Object
- Object
- TwitterCldr::Utils::RegexpAst::Quantifier
- Defined in:
- lib/twitter_cldr/utils/regexp_ast.rb
Instance Attribute Summary collapse
-
#max ⇒ Object
readonly
Returns the value of attribute max.
-
#min ⇒ Object
readonly
Returns the value of attribute min.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max, min) ⇒ Quantifier
constructor
A new instance of Quantifier.
Constructor Details
#initialize(max, min) ⇒ Quantifier
Returns a new instance of Quantifier.
90 91 92 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 90 def initialize(max, min) @max = max; @min = min end |
Instance Attribute Details
#max ⇒ Object (readonly)
Returns the value of attribute max.
88 89 90 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 88 def max @max end |
#min ⇒ Object (readonly)
Returns the value of attribute min.
88 89 90 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 88 def min @min end |
Class Method Details
.from_parser_node(node) ⇒ Object
94 95 96 97 98 99 100 101 |
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 94 def self.from_parser_node(node) if node.quantifier new( node.quantifier.max, node.quantifier.min ) end end |