Class: RegexpTree::Paren
Overview
Constant Summary
Constants inherited
from RegexpTree
EmptySequence, EmptySet
Instance Method Summary
collapse
Methods inherited from RegexpTree
#*, #+, alt, backref, charclass, #closure, #empty_sequence?, #empty_set?, #group, inherited, #inspect, linebeg, lineend, #lookahead, #negative_lookahead, non_word_boundary, #nongreedy_closure, #nongreedy_ntimes, #nongreedy_optional, #nongreedy_positive_closure, #nongreedy_rep, #ntimes, #optional, #paren, #parenthesize, #positive_closure, #pretty_print, previous_match, #regexp, #rep, rep, seq, str, strbeg, strend, strlineend, #to_s, word_boundary, #|
Constructor Details
#initialize(r, mark = '?:') ⇒ Paren
Returns a new instance of Paren.
495
496
497
498
|
# File 'lib/regexptree.rb', line 495
def initialize(r, mark='?:')
@mark = mark
@r = r
end
|
Instance Method Details
#case_insensitive? ⇒ Boolean
500
501
502
503
|
# File 'lib/regexptree.rb', line 500
def case_insensitive?
@r.case_insensitive?
end
|
#downcase ⇒ Object
510
511
512
|
# File 'lib/regexptree.rb', line 510
def downcase
Paren.new(@r.downcase, @mark)
end
|
#multiline_insensitive? ⇒ Boolean
505
506
507
508
|
# File 'lib/regexptree.rb', line 505
def multiline_insensitive?
@r.multiline_insensitive?
end
|
514
515
516
517
518
|
# File 'lib/regexptree.rb', line 514
def pretty_format(out)
out.group(1 + @mark.length, "(#@mark", ')') {
@r.pretty_format(out)
}
end
|