Module: Patm
Defined Under Namespace
Modules: DSL
Classes: CaseBinder, Match, Pattern, Rule, RuleCache
Constant Summary
collapse
- EXACT =
Object.new
- PREDEF_GROUP_SIZE =
100
Class Method Summary
collapse
Class Method Details
._any ⇒ Object
394
395
396
|
# File 'lib/patm.rb', line 394
def self._any
@any ||= Pattern::Any.new
end
|
._xs ⇒ Object
398
399
400
|
# File 'lib/patm.rb', line 398
def self._xs
@xs = Pattern::ArrRest.new
end
|
.exact ⇒ Object
Use in Hash key. Specify exact match or not.
414
415
416
|
# File 'lib/patm.rb', line 414
def self.exact
EXACT
end
|
.match(plain_pat) ⇒ Object
.opt(pat = _any) ⇒ Object
Use in hash value. Mark this pattern is optional.
.or(*pats) ⇒ Object
390
391
392
|
# File 'lib/patm.rb', line 390
def self.or(*pats)
Pattern::Or.new(pats.map{|p| Pattern.build_from(p) })
end
|