class Arugula::QuantifierPart
Public Class Methods
new(before, after, *args)
click to toggle source
Calls superclass method
Arugula::MatchNTimes::new
# File lib/arugula/parts.rb, line 268 def initialize(before, after, *args) super(*args, times: before..after) end
Public Instance Methods
to_s()
click to toggle source
# File lib/arugula/parts.rb, line 272 def to_s before = @times.begin after = @times.end quantifier_part = '{'.dup quantifier_part << before.to_s unless before == 0 quantifier_part << ',' unless before == after quantifier_part << after.to_s unless before == after || after == Float::INFINITY quantifier_part << '}' "#{wrapped}#{quantifier_part}" end