Class: RBNF::Opt
Overview
Optation node
Constant Summary
Constants included from RBNF
Instance Attribute Summary
Attributes inherited from Unary
Instance Method Summary collapse
Methods inherited from Unary
Methods included from RBNF
#=~, [], #alt, #cat, #comps, def, define, dememoize, #except, #group, method_missing, #opt, #rep, #rep_n
Constructor Details
This class inherits a constructor from RBNF::Unary
Instance Method Details
#match(s) ⇒ Object
60 61 62 |
# File 'lib/rbnf/nodes.rb', line 60 def match(s) s.empty? or a=~s end |
#to_s ⇒ Object
57 58 59 |
# File 'lib/rbnf/nodes.rb', line 57 def to_s "[ #{a} ]" end |